Skip to content

Commit

Permalink
Merge pull request lightningnetwork#9257 from starius/estimatefeerate…
Browse files Browse the repository at this point in the history
…-regtest2

chainreg: use feerate estimator in regtest and simnet
  • Loading branch information
guggero authored Dec 3, 2024
2 parents ff2a1a4 + 23b025c commit 48fba10
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
12 changes: 6 additions & 6 deletions chainreg/chainregistry.go
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,7 @@ func NewPartialChainControl(cfg *Config) (*PartialChainControl, func(), error) {
)
cc.ChainSource = bitcoindConn.NewBitcoindClient()

// If we're not in regtest mode, then we'll attempt to use a
// proper fee estimator for testnet.
// Initialize config to connect to bitcoind RPC.
rpcConfig := &rpcclient.ConnConfig{
Host: bitcoindHost,
User: bitcoindMode.RPCUser,
Expand All @@ -396,7 +395,9 @@ func NewPartialChainControl(cfg *Config) (*PartialChainControl, func(), error) {
DisableTLS: true,
HTTPPostMode: true,
}
if !cfg.Bitcoin.RegTest {

// If feeurl is not provided, use bitcoind's fee estimator.
if cfg.Fee.URL == "" {
log.Infof("Initializing bitcoind backed fee estimator "+
"in %s mode", bitcoindMode.EstimateMode)

Expand Down Expand Up @@ -660,9 +661,8 @@ func NewPartialChainControl(cfg *Config) (*PartialChainControl, func(), error) {
return checkOutboundPeers(chainRPC.Client)
}

// If we're not in simnet or regtest mode, then we'll attempt
// to use a proper fee estimator for testnet.
if !cfg.Bitcoin.SimNet && !cfg.Bitcoin.RegTest {
// If feeurl is not provided, use btcd's fee estimator.
if cfg.Fee.URL == "" {
log.Info("Initializing btcd backed fee estimator")

// Finally, we'll re-initialize the fee estimator, as
Expand Down
5 changes: 5 additions & 0 deletions docs/release-notes/release-notes-0.19.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,11 @@ The underlying functionality between those two options remain the same.
for the Gossip 1.75 protocol.

## Testing

* LND [uses](https://github.com/lightningnetwork/lnd/pull/9257) the feerate
estimator provided by bitcoind or btcd in regtest and simnet modes instead of
static fee estimator if feeurl is not provided.

## Database

* [Migrate the mission control
Expand Down

0 comments on commit 48fba10

Please sign in to comment.