multi: add new method FeePerVByte to avoid manual conversion
This commit is contained in:
6 files changed
+17
-16
No files matched your search
@@ -782,12 +782,12 @@ func (w *WalletKit) PendingSweeps(ctx context.Context,
|
||||
|
||||
op := lnrpc.MarshalOutPoint(&pendingInput.OutPoint)
|
||||
amountSat := uint32(pendingInput.Amount)
|
||||
satPerVbyte := uint64(pendingInput.LastFeeRate.FeePerKVByte() / 1000)
|
||||
satPerVbyte := uint64(pendingInput.LastFeeRate.FeePerVByte())
|
||||
broadcastAttempts := uint32(pendingInput.BroadcastAttempts)
|
||||
nextBroadcastHeight := uint32(pendingInput.NextBroadcastHeight)
|
||||
|
||||
requestedFee := pendingInput.Params.Fee
|
||||
requestedFeeRate := uint64(requestedFee.FeeRate.FeePerKVByte() / 1000)
|
||||
requestedFeeRate := uint64(requestedFee.FeeRate.FeePerVByte())
|
||||
|
||||
rpcPendingSweeps = append(rpcPendingSweeps, &PendingSweep{
|
||||
Outpoint: op,
|
||||
|
||||
@@ -476,15 +476,11 @@ func (c *WatchtowerClient) Policy(ctx context.Context,
|
||||
}
|
||||
|
||||
return &PolicyResponse{
|
||||
MaxUpdates: uint32(policy.MaxUpdates),
|
||||
SweepSatPerVbyte: uint32(
|
||||
policy.SweepFeeRate.FeePerKVByte() / 1000,
|
||||
),
|
||||
MaxUpdates: uint32(policy.MaxUpdates),
|
||||
SweepSatPerVbyte: uint32(policy.SweepFeeRate.FeePerVByte()),
|
||||
|
||||
// Deprecated field.
|
||||
SweepSatPerByte: uint32(
|
||||
policy.SweepFeeRate.FeePerKVByte() / 1000,
|
||||
),
|
||||
SweepSatPerByte: uint32(policy.SweepFeeRate.FeePerVByte()),
|
||||
}, nil
|
||||
}
|
||||
|
||||
@@ -519,7 +515,7 @@ func marshallTower(tower *wtclient.RegisteredTower, policyType PolicyType,
|
||||
|
||||
rpcSessions = make([]*TowerSession, 0, len(tower.Sessions))
|
||||
for _, session := range sessions {
|
||||
satPerVByte := session.Policy.SweepFeeRate.FeePerKVByte() / 1000
|
||||
satPerVByte := session.Policy.SweepFeeRate.FeePerVByte()
|
||||
rpcSessions = append(rpcSessions, &TowerSession{
|
||||
NumBackups: uint32(ackCounts[session.ID]),
|
||||
NumPendingBackups: uint32(pendingCounts[session.ID]),
|
||||
|
||||
Reference in new issue
Block a user