build: update btcwallet dependency introducing pruned bitcoind support

This is achieved by some recent work within the BitcoindClient enabling
it to retrieve pruned blocks from its server's peers.
This commit is contained in:
Wilmer Paulino
2021-03-09 14:12:26 -08:00
parent d1c7059f14
commit 82fe5d9bba
7 changed files with 61 additions and 24 deletions

View File

@@ -105,6 +105,11 @@ type Config struct {
// DBTimeOut specifies the timeout value to use when opening the wallet
// database.
DBTimeOut time.Duration
// Dialer is a function closure that will be used to establish outbound
// TCP connections to Bitcoin peers in the event of a pruned block being
// requested.
Dialer chain.Dialer
}
const (
@@ -383,12 +388,16 @@ func NewChainControl(cfg *Config) (*ChainControl, error) {
// Establish the connection to bitcoind and create the clients
// required for our relevant subsystems.
bitcoindConn, err := chain.NewBitcoindConn(
cfg.ActiveNetParams.Params, bitcoindHost,
bitcoindMode.RPCUser, bitcoindMode.RPCPass,
bitcoindMode.ZMQPubRawBlock, bitcoindMode.ZMQPubRawTx,
5*time.Second,
)
bitcoindConn, err := chain.NewBitcoindConn(&chain.BitcoindConfig{
ChainParams: cfg.ActiveNetParams.Params,
Host: bitcoindHost,
User: bitcoindMode.RPCUser,
Pass: bitcoindMode.RPCPass,
ZMQBlockHost: bitcoindMode.ZMQPubRawBlock,
ZMQTxHost: bitcoindMode.ZMQPubRawTx,
ZMQReadDeadline: 5 * time.Second,
Dialer: cfg.Dialer,
})
if err != nil {
return nil, err
}