multi: update btcwallet to v0.15.0

Update go.mod to point to latest btcwallet version.
This commit is contained in:
Elle Mouton 2022-04-28 15:31:59 +02:00
parent ddeccf8fcc
commit 5a08788a05
No known key found for this signature in database
GPG Key ID: D7D916376026F177
7 changed files with 50 additions and 32 deletions

View File

@ -235,13 +235,15 @@ func NewBitcoindBackend(t *testing.T, minerAddr string,
host := fmt.Sprintf("127.0.0.1:%d", rpcPort) host := fmt.Sprintf("127.0.0.1:%d", rpcPort)
conn, err := chain.NewBitcoindConn(&chain.BitcoindConfig{ conn, err := chain.NewBitcoindConn(&chain.BitcoindConfig{
ChainParams: NetParams, ChainParams: NetParams,
Host: host, Host: host,
User: "weks", User: "weks",
Pass: "weks", Pass: "weks",
ZMQBlockHost: zmqBlockHost, ZMQConfig: &chain.ZMQConfig{
ZMQTxHost: zmqTxHost, ZMQBlockHost: zmqBlockHost,
ZMQReadDeadline: 5 * time.Second, ZMQTxHost: zmqTxHost,
ZMQReadDeadline: 5 * time.Second,
},
// Fields only required for pruned nodes, not needed for these // Fields only required for pruned nodes, not needed for these
// tests. // tests.
Dialer: nil, Dialer: nil,

View File

@ -402,13 +402,15 @@ func NewPartialChainControl(cfg *Config) (*PartialChainControl, func(), error) {
// Establish the connection to bitcoind and create the clients // Establish the connection to bitcoind and create the clients
// required for our relevant subsystems. // required for our relevant subsystems.
bitcoindConn, err := chain.NewBitcoindConn(&chain.BitcoindConfig{ bitcoindConn, err := chain.NewBitcoindConn(&chain.BitcoindConfig{
ChainParams: cfg.ActiveNetParams.Params, ChainParams: cfg.ActiveNetParams.Params,
Host: bitcoindHost, Host: bitcoindHost,
User: bitcoindMode.RPCUser, User: bitcoindMode.RPCUser,
Pass: bitcoindMode.RPCPass, Pass: bitcoindMode.RPCPass,
ZMQBlockHost: bitcoindMode.ZMQPubRawBlock, ZMQConfig: &chain.ZMQConfig{
ZMQTxHost: bitcoindMode.ZMQPubRawTx, ZMQBlockHost: bitcoindMode.ZMQPubRawBlock,
ZMQReadDeadline: 5 * time.Second, ZMQTxHost: bitcoindMode.ZMQPubRawTx,
ZMQReadDeadline: 5 * time.Second,
},
Dialer: cfg.Dialer, Dialer: cfg.Dialer,
PrunedModeMaxPeers: bitcoindMode.PrunedNodeMaxPeers, PrunedModeMaxPeers: bitcoindMode.PrunedNodeMaxPeers,
}) })

2
go.mod
View File

@ -9,7 +9,7 @@ require (
github.com/btcsuite/btcd/btcutil/psbt v1.1.3 github.com/btcsuite/btcd/btcutil/psbt v1.1.3
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f
github.com/btcsuite/btcwallet v0.14.1-0.20220412233800-3a6d5d0702b7 github.com/btcsuite/btcwallet v0.15.0
github.com/btcsuite/btcwallet/wallet/txauthor v1.2.3 github.com/btcsuite/btcwallet/wallet/txauthor v1.2.3
github.com/btcsuite/btcwallet/wallet/txrules v1.2.0 github.com/btcsuite/btcwallet/wallet/txrules v1.2.0
github.com/btcsuite/btcwallet/walletdb v1.4.0 github.com/btcsuite/btcwallet/walletdb v1.4.0

4
go.sum
View File

@ -95,8 +95,8 @@ github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtyd
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f h1:bAs4lUbRJpnnkd9VhRV3jjAVU7DJVjMaK+IsvSeZvFo= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f h1:bAs4lUbRJpnnkd9VhRV3jjAVU7DJVjMaK+IsvSeZvFo=
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA=
github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg=
github.com/btcsuite/btcwallet v0.14.1-0.20220412233800-3a6d5d0702b7 h1:K7omr0FIjwwwQXTMgp2d+DTRH71RlkjRKj/Ir6Zkqb0= github.com/btcsuite/btcwallet v0.15.0 h1:FdgC7JySVQJIcU+3W+kswDPv8rtzArGNQLOn2g3TiLg=
github.com/btcsuite/btcwallet v0.14.1-0.20220412233800-3a6d5d0702b7/go.mod h1:EE9BactCCWhCFoVfxCJrSFINrYqLx/Tq6quxRlPTpzM= github.com/btcsuite/btcwallet v0.15.0/go.mod h1:EE9BactCCWhCFoVfxCJrSFINrYqLx/Tq6quxRlPTpzM=
github.com/btcsuite/btcwallet/wallet/txauthor v1.2.1/go.mod h1:/74bubxX5Js48d76nf/TsNabpYp/gndUuJw4chzCmhU= github.com/btcsuite/btcwallet/wallet/txauthor v1.2.1/go.mod h1:/74bubxX5Js48d76nf/TsNabpYp/gndUuJw4chzCmhU=
github.com/btcsuite/btcwallet/wallet/txauthor v1.2.3 h1:M2yr5UlULvpqtxUqpMxTME/pA92Z9cpqeyvAFk9lAg0= github.com/btcsuite/btcwallet/wallet/txauthor v1.2.3 h1:M2yr5UlULvpqtxUqpMxTME/pA92Z9cpqeyvAFk9lAg0=
github.com/btcsuite/btcwallet/wallet/txauthor v1.2.3/go.mod h1:T2xSiKGpUkSLCh68aF+FMXmKK9mFqNdHl9VaqOr+JjU= github.com/btcsuite/btcwallet/wallet/txauthor v1.2.3/go.mod h1:T2xSiKGpUkSLCh68aF+FMXmKK9mFqNdHl9VaqOr+JjU=

View File

@ -932,7 +932,17 @@ func (b *BtcWallet) LeaseOutput(id wtxmgr.LockID, op wire.OutPoint,
// ListLeasedOutputs returns a list of all currently locked outputs. // ListLeasedOutputs returns a list of all currently locked outputs.
func (b *BtcWallet) ListLeasedOutputs() ([]*wtxmgr.LockedOutput, error) { func (b *BtcWallet) ListLeasedOutputs() ([]*wtxmgr.LockedOutput, error) {
return b.wallet.ListLeasedOutputs() leasedOutputs, err := b.wallet.ListLeasedOutputs()
if err != nil {
return nil, err
}
lockedOutputs := make([]*wtxmgr.LockedOutput, len(leasedOutputs))
for i, output := range leasedOutputs {
lockedOutputs[i] = output.LockedOutput
}
return lockedOutputs, nil
} }
// ReleaseOutput unlocks an output, allowing it to be available for coin // ReleaseOutput unlocks an output, allowing it to be available for coin

View File

@ -3405,13 +3405,15 @@ func runTests(t *testing.T, walletDriver *lnwallet.WalletDriver,
var chainConn *chain.BitcoindConn var chainConn *chain.BitcoindConn
err = wait.NoError(func() error { err = wait.NoError(func() error {
chainConn, err = chain.NewBitcoindConn(&chain.BitcoindConfig{ chainConn, err = chain.NewBitcoindConn(&chain.BitcoindConfig{
ChainParams: netParams, ChainParams: netParams,
Host: host, Host: host,
User: "weks", User: "weks",
Pass: "weks", Pass: "weks",
ZMQBlockHost: zmqBlockHost, ZMQConfig: &chain.ZMQConfig{
ZMQTxHost: zmqTxHost, ZMQBlockHost: zmqBlockHost,
ZMQReadDeadline: 5 * time.Second, ZMQTxHost: zmqTxHost,
ZMQReadDeadline: 5 * time.Second,
},
// Fields only required for pruned nodes, not // Fields only required for pruned nodes, not
// needed for these tests. // needed for these tests.
Dialer: nil, Dialer: nil,

View File

@ -828,13 +828,15 @@ var interfaceImpls = []struct {
host := fmt.Sprintf("127.0.0.1:%d", rpcPort) host := fmt.Sprintf("127.0.0.1:%d", rpcPort)
chainConn, err := chain.NewBitcoindConn(&chain.BitcoindConfig{ chainConn, err := chain.NewBitcoindConn(&chain.BitcoindConfig{
ChainParams: &chaincfg.RegressionNetParams, ChainParams: &chaincfg.RegressionNetParams,
Host: host, Host: host,
User: "weks", User: "weks",
Pass: "weks", Pass: "weks",
ZMQBlockHost: zmqBlockHost, ZMQConfig: &chain.ZMQConfig{
ZMQTxHost: zmqTxHost, ZMQBlockHost: zmqBlockHost,
ZMQReadDeadline: 5 * time.Second, ZMQTxHost: zmqTxHost,
ZMQReadDeadline: 5 * time.Second,
},
// Fields only required for pruned nodes, not // Fields only required for pruned nodes, not
// needed for these tests. // needed for these tests.
Dialer: nil, Dialer: nil,