mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 01:43:16 +01:00
chainreg: update bitcoind polling config
This commit is contained in:
parent
d5db1950cd
commit
66d1392f7f
@ -253,6 +253,8 @@ func GenDefaultBtcConstraints() channeldb.ChannelConstraints {
|
||||
// NewPartialChainControl creates a new partial chain control that contains all
|
||||
// the parts that can be purely constructed from the passed in global
|
||||
// configuration and doesn't need any wallet instance yet.
|
||||
//
|
||||
//nolint:lll
|
||||
func NewPartialChainControl(cfg *Config) (*PartialChainControl, func(), error) {
|
||||
// Set the RPC config from the "home" chain. Multi-chain isn't yet
|
||||
// active, so we'll restrict usage to a particular chain for now.
|
||||
@ -414,14 +416,17 @@ func NewPartialChainControl(cfg *Config) (*PartialChainControl, func(), error) {
|
||||
|
||||
if bitcoindMode.RPCPolling {
|
||||
bitcoindCfg.PollingConfig = &chain.PollingConfig{
|
||||
BlockPollingInterval: bitcoindMode.BlockPollingInterval,
|
||||
TxPollingInterval: bitcoindMode.TxPollingInterval,
|
||||
BlockPollingInterval: bitcoindMode.BlockPollingInterval,
|
||||
TxPollingInterval: bitcoindMode.TxPollingInterval,
|
||||
TxPollingIntervalJitter: lncfg.DefaultTxPollingJitter,
|
||||
}
|
||||
} else {
|
||||
bitcoindCfg.ZMQConfig = &chain.ZMQConfig{
|
||||
ZMQBlockHost: bitcoindMode.ZMQPubRawBlock,
|
||||
ZMQTxHost: bitcoindMode.ZMQPubRawTx,
|
||||
ZMQReadDeadline: bitcoindMode.ZMQReadDeadline,
|
||||
ZMQBlockHost: bitcoindMode.ZMQPubRawBlock,
|
||||
ZMQTxHost: bitcoindMode.ZMQPubRawTx,
|
||||
ZMQReadDeadline: bitcoindMode.ZMQReadDeadline,
|
||||
MempoolPollingInterval: bitcoindMode.TxPollingInterval,
|
||||
PollingIntervalJitter: lncfg.DefaultTxPollingJitter,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,12 @@ package lncfg
|
||||
|
||||
import "time"
|
||||
|
||||
const (
|
||||
// DefaultTxPollingJitter defines the default TxPollingIntervalJitter
|
||||
// to be used for bitcoind backend.
|
||||
DefaultTxPollingJitter = 0.5
|
||||
)
|
||||
|
||||
// Bitcoind holds the configuration options for the daemon's connection to
|
||||
// bitcoind.
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user