File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -787,18 +787,12 @@ impl ChainSource {
787787 for target in confirmation_targets {
788788 let num_blocks = get_num_block_defaults_for_target ( target) ;
789789
790+ // Convert the retrieved fee rate and fall back to 1 sat/vb if we fail or it
791+ // yields less than that. This is mostly necessary to continue on
792+ // `signet`/`regtest` where we might not get estimates (or bogus values).
790793 let converted_estimate_sat_vb =
791- esplora_client:: convert_fee_rate ( num_blocks, estimates. clone ( ) ) . map_err (
792- |e| {
793- log_error ! (
794- logger,
795- "Failed to convert fee rate estimates for {:?}: {}" ,
796- target,
797- e
798- ) ;
799- Error :: FeerateEstimationUpdateFailed
800- } ,
801- ) ?;
794+ esplora_client:: convert_fee_rate ( num_blocks, estimates. clone ( ) )
795+ . map_or ( 1.0 , |converted| converted. max ( 1.0 ) ) ;
802796
803797 let fee_rate =
804798 FeeRate :: from_sat_per_kwu ( ( converted_estimate_sat_vb * 250.0 ) as u64 ) ;
You can’t perform that action at this time.
0 commit comments