Skip to content

Commit 032d6b8

Browse files
committed
SendCoins: use SatPerVbyte instead of SatPerByte
SatPerByte is deprecated.
1 parent 548fa9b commit 032d6b8

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

lightning_client.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -209,12 +209,12 @@ type LightningClient interface {
209209

210210
// SendCoins sends the passed amount of (or all) coins to the passed
211211
// address. Either amount or sendAll must be specified, while
212-
// confTarget, satsPerByte are optional and may be set to zero in which
212+
// confTarget, satsPerVByte are optional and may be set to zero in which
213213
// case automatic conf target and fee will be used. Returns the tx id
214214
// upon success.
215215
SendCoins(ctx context.Context, addr btcutil.Address,
216216
amount btcutil.Amount, sendAll bool, confTarget int32,
217-
satsPerByte int64, label string) (string, error)
217+
satsPerVByte chainfee.SatPerVByte, label string) (string, error)
218218

219219
// ChannelBalance returns a summary of our channel balances.
220220
ChannelBalance(ctx context.Context) (*ChannelBalance, error)
@@ -3592,25 +3592,25 @@ func (s *lightningClient) Connect(ctx context.Context, peer route.Vertex,
35923592
}
35933593

35943594
// SendCoins sends the passed amount of (or all) coins to the passed address.
3595-
// Either amount or sendAll must be specified, while confTarget, satsPerByte are
3596-
// optional and may be set to zero in which case automatic conf target and fee
3597-
// will be used. Returns the tx id upon success.
3595+
// Either amount or sendAll must be specified, while confTarget, satsPerVByte
3596+
// are optional and may be set to zero in which case automatic conf target and
3597+
// fee will be used. Returns the tx id upon success.
35983598
func (s *lightningClient) SendCoins(ctx context.Context, addr btcutil.Address,
35993599
amount btcutil.Amount, sendAll bool, confTarget int32,
3600-
satsPerByte int64, label string) (string, error) {
3600+
satsPerVByte chainfee.SatPerVByte, label string) (string, error) {
36013601

36023602
rpcCtx, cancel := context.WithTimeout(ctx, s.timeout)
36033603
defer cancel()
36043604

36053605
rpcCtx = s.adminMac.WithMacaroonAuth(rpcCtx)
36063606

36073607
req := &lnrpc.SendCoinsRequest{
3608-
Addr: addr.String(),
3609-
Amount: int64(amount),
3610-
TargetConf: confTarget,
3611-
SatPerByte: satsPerByte,
3612-
SendAll: sendAll,
3613-
Label: label,
3608+
Addr: addr.String(),
3609+
Amount: int64(amount),
3610+
TargetConf: confTarget,
3611+
SatPerVbyte: uint64(satsPerVByte),
3612+
SendAll: sendAll,
3613+
Label: label,
36143614
}
36153615

36163616
resp, err := s.client.SendCoins(rpcCtx, req)

0 commit comments

Comments
 (0)