diff --git a/go.mod b/go.mod index 45bac73..7cd659c 100644 --- a/go.mod +++ b/go.mod @@ -20,6 +20,7 @@ require ( require ( dario.cat/mergo v1.0.1 // indirect github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect + github.com/BurntSushi/toml v1.3.2 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da // indirect @@ -118,7 +119,7 @@ require ( github.com/ncruces/go-strftime v0.1.9 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.0.2 // indirect - github.com/opencontainers/runc v1.2.0 // indirect + github.com/opencontainers/runc v1.2.8 // indirect github.com/ory/dockertest/v3 v3.10.0 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect diff --git a/go.sum b/go.sum index 1ac132f..02261c6 100644 --- a/go.sum +++ b/go.sum @@ -9,8 +9,9 @@ dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s= dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= -github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= +github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc= github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= @@ -429,8 +430,8 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8 github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/runc v1.2.0 h1:qke7ZVCmJcKrJVY2iHJVC+0kql9uYdkusOPsQOOeBw4= -github.com/opencontainers/runc v1.2.0/go.mod h1:/PXzF0h531HTMsYQnmxXkBD7YaGShm/2zcRB79dksUc= +github.com/opencontainers/runc v1.2.8 h1:RnEICeDReapbZ5lZEgHvj7E9Q3Eex9toYmaGBsbvU5Q= +github.com/opencontainers/runc v1.2.8/go.mod h1:cC0YkmZcuvr+rtBZ6T7NBoVbMGNAdLa/21vIElJDOzI= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/ory/dockertest/v3 v3.10.0 h1:4K3z2VMe8Woe++invjaTB7VRyQXQy5UY+loujO4aNE4= github.com/ory/dockertest/v3 v3.10.0/go.mod h1:nr57ZbRWMqfsdGdFNLHz5jjNdDb7VVFnzAeW1n5N1Lg= diff --git a/lightning_client.go b/lightning_client.go index f64f408..71e00d0 100644 --- a/lightning_client.go +++ b/lightning_client.go @@ -209,12 +209,12 @@ type LightningClient interface { // SendCoins sends the passed amount of (or all) coins to the passed // address. Either amount or sendAll must be specified, while - // confTarget, satsPerByte are optional and may be set to zero in which + // confTarget, satsPerVByte are optional and may be set to zero in which // case automatic conf target and fee will be used. Returns the tx id // upon success. SendCoins(ctx context.Context, addr btcutil.Address, amount btcutil.Amount, sendAll bool, confTarget int32, - satsPerByte int64, label string) (string, error) + satsPerVByte chainfee.SatPerVByte, label string) (string, error) // ChannelBalance returns a summary of our channel balances. ChannelBalance(ctx context.Context) (*ChannelBalance, error) @@ -3631,12 +3631,12 @@ func (s *lightningClient) Connect(ctx context.Context, peer route.Vertex, } // SendCoins sends the passed amount of (or all) coins to the passed address. -// Either amount or sendAll must be specified, while confTarget, satsPerByte are -// optional and may be set to zero in which case automatic conf target and fee -// will be used. Returns the tx id upon success. +// Either amount or sendAll must be specified, while confTarget, satsPerVByte +// are optional and may be set to zero in which case automatic conf target and +// fee will be used. Returns the tx id upon success. func (s *lightningClient) SendCoins(ctx context.Context, addr btcutil.Address, amount btcutil.Amount, sendAll bool, confTarget int32, - satsPerByte int64, label string) (string, error) { + satsPerVByte chainfee.SatPerVByte, label string) (string, error) { rpcCtx, cancel := context.WithTimeout(ctx, s.timeout) defer cancel() @@ -3644,12 +3644,12 @@ func (s *lightningClient) SendCoins(ctx context.Context, addr btcutil.Address, rpcCtx = s.adminMac.WithMacaroonAuth(rpcCtx) req := &lnrpc.SendCoinsRequest{ - Addr: addr.String(), - Amount: int64(amount), - TargetConf: confTarget, - SatPerByte: satsPerByte, - SendAll: sendAll, - Label: label, + Addr: addr.String(), + Amount: int64(amount), + TargetConf: confTarget, + SatPerVbyte: uint64(satsPerVByte), + SendAll: sendAll, + Label: label, } resp, err := s.client.SendCoins(rpcCtx, req)