Skip to content

Commit 0377cc8

Browse files
committed
SendCoins: use SatPerVbyte instead of SatPerByte
SatPerByte is deprecated.
1 parent 4ae42de commit 0377cc8

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)
@@ -3631,25 +3631,25 @@ func (s *lightningClient) Connect(ctx context.Context, peer route.Vertex,
36313631
}
36323632

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

36413641
rpcCtx, cancel := context.WithTimeout(ctx, s.timeout)
36423642
defer cancel()
36433643

36443644
rpcCtx = s.adminMac.WithMacaroonAuth(rpcCtx)
36453645

36463646
req := &lnrpc.SendCoinsRequest{
3647-
Addr: addr.String(),
3648-
Amount: int64(amount),
3649-
TargetConf: confTarget,
3650-
SatPerByte: satsPerByte,
3651-
SendAll: sendAll,
3652-
Label: label,
3647+
Addr: addr.String(),
3648+
Amount: int64(amount),
3649+
TargetConf: confTarget,
3650+
SatPerVbyte: uint64(satsPerVByte),
3651+
SendAll: sendAll,
3652+
Label: label,
36533653
}
36543654

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

0 commit comments

Comments
 (0)