Skip to content

Commit bf97cfe

Browse files
committed
f Handle regtest/signet and testnet differently
On the former we just immediately fall back to the usual 1sat/vb, while on testnet we might accept to quietly fail estimation, which will have us fall back to the configured fee rate fallback values.
1 parent 85fba8e commit bf97cfe

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/chain/mod.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -908,8 +908,19 @@ impl ChainSource {
908908
log_error!(logger, "Failed to retrieve fee rate estimates: {}", e);
909909
return Err(Error::FeerateEstimationUpdateFailed);
910910
},
911+
(Err(e), n) if n == Network::Regtest || n == Network::Signet => {
912+
// On regtest/signet we just fall back to the usual 1 sat/vb == 250
913+
// sat/kwu default.
914+
log_error!(
915+
logger,
916+
"Failed to retrieve fee rate estimates: {}. Falling back to default of 1 sat/vb.",
917+
e,
918+
);
919+
FeeRate::from_sat_per_kwu(250)
920+
},
911921
(Err(e), _) => {
912-
// On regtest/testnet/signet we just skip, which will have us falling back to defaults.
922+
// On testnet `estimatesmartfee` can be unreliable so we just skip in
923+
// case of a failure, which will have us falling back to defaults.
913924
log_error!(
914925
logger,
915926
"Failed to retrieve fee rate estimates: {}. Falling back to defaults.",

0 commit comments

Comments
 (0)