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 @@ -309,22 +309,25 @@ impl<K: KVStore + Sync + Send + 'static> Node<K> {
309
309
// Block to ensure we update our fee rate cache once on startup
310
310
let wallet = Arc :: clone ( & self . wallet ) ;
311
311
let sync_logger = Arc :: clone ( & self . logger ) ;
312
- runtime. 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)
312
+ let runtime_ref = & runtime;
313
+ tokio:: task:: block_in_place ( move || {
314
+ runtime_ref. block_on ( async move {
315
+ let now = Instant :: now ( ) ;
316
+ match wallet. update_fee_estimates ( ) . await {
317
+ Ok ( ( ) ) => {
318
+ log_info ! (
319
+ sync_logger,
320
+ "Initial fee rate cache update finished in {}ms." ,
321
+ now. elapsed( ) . as_millis( )
322
+ ) ;
323
+ Ok ( ( ) )
324
+ }
325
+ Err ( e) => {
326
+ log_error ! ( sync_logger, "Initial fee rate cache update failed: {}" , e, ) ;
327
+ Err ( e)
328
+ }
326
329
}
327
- }
330
+ } )
328
331
} ) ?;
329
332
330
333
// Setup wallet sync
You can’t perform that action at this time.
0 commit comments