decred / dcrlnd

Decred Lightning Network Daemon ⚡️
MIT License
36 stars 24 forks source link

lnwallet/chainfee: add dcrdata-based fee estimator #156

Closed buck54321 closed 8 months ago

buck54321 commented 2 years ago
DCRDataFeeEstimator is an Estimator based on the common public
dcrdata servers for mainnet or testnet. The Estimator is only used
for chainControl using cfg.Node = "dcrw".

dcrdata requests did not work with the exising WebAPIEstimator
because that interface was designed around a single request returning
a map of fee estimates. dcrdata returns a map, but only supports
requesting one estimate (blockNum) at a time. The WebAPIEstimator
could have been adapted for dcrdata, but since we would need to cache
at least 4 estimates instead of 1 (and supporting no other values),
generating 4 requests on a repeated timer, I thought using a lazy-load
approach with a cache and sensible fail modes was a better option.
matheusd commented 8 months ago

Outdated.