multi: add rpcpolling config options
This commit is contained in:
1 parent
0459ccf542
commit
7509af1a70
3 files changed
+52
-23
No files matched your search
+22
-12
@@ -399,21 +399,31 @@ func NewPartialChainControl(cfg *Config) (*PartialChainControl, func(), error) {
|
||||
}
|
||||
}
|
||||
|
||||
// Establish the connection to bitcoind and create the clients
|
||||
// required for our relevant subsystems.
|
||||
bitcoindConn, err := chain.NewBitcoindConn(&chain.BitcoindConfig{
|
||||
ChainParams: cfg.ActiveNetParams.Params,
|
||||
Host: bitcoindHost,
|
||||
User: bitcoindMode.RPCUser,
|
||||
Pass: bitcoindMode.RPCPass,
|
||||
ZMQConfig: &chain.ZMQConfig{
|
||||
bitcoindCfg := &chain.BitcoindConfig{
|
||||
ChainParams: cfg.ActiveNetParams.Params,
|
||||
Host: bitcoindHost,
|
||||
User: bitcoindMode.RPCUser,
|
||||
Pass: bitcoindMode.RPCPass,
|
||||
Dialer: cfg.Dialer,
|
||||
PrunedModeMaxPeers: bitcoindMode.PrunedNodeMaxPeers,
|
||||
}
|
||||
|
||||
if bitcoindMode.RPCPolling {
|
||||
bitcoindCfg.PollingConfig = &chain.PollingConfig{
|
||||
BlockPollingInterval: bitcoindMode.BlockPollingInterval,
|
||||
TxPollingInterval: bitcoindMode.TxPollingInterval,
|
||||
}
|
||||
} else {
|
||||
bitcoindCfg.ZMQConfig = &chain.ZMQConfig{
|
||||
ZMQBlockHost: bitcoindMode.ZMQPubRawBlock,
|
||||
ZMQTxHost: bitcoindMode.ZMQPubRawTx,
|
||||
ZMQReadDeadline: bitcoindMode.ZMQReadDeadline,
|
||||
},
|
||||
Dialer: cfg.Dialer,
|
||||
PrunedModeMaxPeers: bitcoindMode.PrunedNodeMaxPeers,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// Establish the connection to bitcoind and create the clients
|
||||
// required for our relevant subsystems.
|
||||
bitcoindConn, err := chain.NewBitcoindConn(bitcoindCfg)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user