chainfee: fetch new relay fee from bitcoind

This commit adds a fetchMinMempoolFee function to the BitcoindEstimator
that fetches the current min mempool fee from the bitcoind backend. The
commit then also updates the BitcoindEstimator to use a minFeeManager
for it's minFeeManager member and uses the fetchMinMempoolFee function
to initialise this.
This commit is contained in:
Elle Mouton committed 2021-10-05 18:30:41 +02:00
1 parent c01699853d
commit 55077d9404
2 files changed
+39 -32

No files matched your search

+2
View File
@@ -5,6 +5,8 @@ import (
"time"
)
const defaultUpdateInterval = 10 * time.Minute
// minFeeManager is used to store and update the minimum fee that is required
// by a transaction to be accepted to the mempool. The minFeeManager ensures
// that the backend used to fetch the fee is not queried too regularly.