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