mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-04 09:48:19 +01:00
lnwallet: remove unused WebAPIEstimator field
This commit is contained in:
parent
c704c5747a
commit
23cd2f40eb
3 changed files with 2 additions and 10 deletions
|
@ -257,7 +257,6 @@ func newChainControlFromConfig(cfg *Config, localDB, remoteDB *channeldb.DB,
|
|||
chainfee.SparseConfFeeSource{
|
||||
URL: cfg.NeutrinoMode.FeeURL,
|
||||
},
|
||||
defaultBitcoinStaticFeePerKW,
|
||||
)
|
||||
|
||||
if err := estimator.Start(); err != nil {
|
||||
|
|
|
@ -540,23 +540,16 @@ type WebAPIEstimator struct {
|
|||
feesMtx sync.Mutex
|
||||
feeByBlockTarget map[uint32]uint32
|
||||
|
||||
// defaultFeePerKw is a fallback value that we'll use if we're unable
|
||||
// to query the API for any reason.
|
||||
defaultFeePerKw SatPerKWeight
|
||||
|
||||
quit chan struct{}
|
||||
wg sync.WaitGroup
|
||||
}
|
||||
|
||||
// NewWebAPIEstimator creates a new WebAPIEstimator from a given URL and a
|
||||
// fallback default fee. The fees are updated whenever a new block is mined.
|
||||
func NewWebAPIEstimator(
|
||||
api WebAPIFeeSource, defaultFee SatPerKWeight) *WebAPIEstimator {
|
||||
|
||||
func NewWebAPIEstimator(api WebAPIFeeSource) *WebAPIEstimator {
|
||||
return &WebAPIEstimator{
|
||||
apiSource: api,
|
||||
feeByBlockTarget: make(map[uint32]uint32),
|
||||
defaultFeePerKw: defaultFee,
|
||||
quit: make(chan struct{}),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -192,7 +192,7 @@ func TestWebAPIFeeEstimator(t *testing.T) {
|
|||
fees: testFees,
|
||||
}
|
||||
|
||||
estimator := NewWebAPIEstimator(feeSource, 10)
|
||||
estimator := NewWebAPIEstimator(feeSource)
|
||||
|
||||
// Test that requesting a fee when no fees have been cached fails.
|
||||
_, err := estimator.EstimateFeePerKW(5)
|
||||
|
|
Loading…
Add table
Reference in a new issue