File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -307,22 +307,25 @@ impl<K: KVStore + Sync + Send + 'static> Node<K> {
307307 // Block to ensure we update our fee rate cache once on startup
308308 let wallet = Arc :: clone ( & self . wallet ) ;
309309 let sync_logger = Arc :: clone ( & self . logger ) ;
310- runtime. block_on ( async move {
311- let now = Instant :: now ( ) ;
312- match wallet. update_fee_estimates ( ) . await {
313- Ok ( ( ) ) => {
314- log_info ! (
315- sync_logger,
316- "Initial fee rate cache update finished in {}ms." ,
317- now. elapsed( ) . as_millis( )
318- ) ;
319- Ok ( ( ) )
320- }
321- Err ( e) => {
322- log_error ! ( sync_logger, "Initial fee rate cache update failed: {}" , e, ) ;
323- Err ( e)
310+ let runtime_ref = & runtime;
311+ tokio:: task:: block_in_place ( move || {
312+ runtime_ref. block_on ( async move {
313+ let now = Instant :: now ( ) ;
314+ match wallet. update_fee_estimates ( ) . await {
315+ Ok ( ( ) ) => {
316+ log_info ! (
317+ sync_logger,
318+ "Initial fee rate cache update finished in {}ms." ,
319+ now. elapsed( ) . as_millis( )
320+ ) ;
321+ Ok ( ( ) )
322+ }
323+ Err ( e) => {
324+ log_error ! ( sync_logger, "Initial fee rate cache update failed: {}" , e, ) ;
325+ Err ( e)
326+ }
324327 }
325- }
328+ } )
326329 } ) ?;
327330
328331 // Setup wallet sync
You can’t perform that action at this time.
0 commit comments