From 71925ebd67b7b2fde9bf7ee7af4ee116ba856e2b Mon Sep 17 00:00:00 2001 From: Tiago Carvalho Date: Fri, 19 Jul 2024 22:42:30 +0100 Subject: [PATCH] inform tokio of blocking call to filter build --- block-index/src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/block-index/src/main.rs b/block-index/src/main.rs index 8ebaac7..06264c3 100644 --- a/block-index/src/main.rs +++ b/block-index/src/main.rs @@ -221,7 +221,7 @@ async fn build_new_block_index(app_state: &AppState) -> Result<(), MainError> { "Read all block heights with masp transactions from db" ); - let _serialized_filter = { + let _serialized_filter = tokio::task::block_in_place(|| { tracing::debug!( "Building binary fuse xor filter of all heights with masp \ transactions" @@ -248,8 +248,8 @@ async fn build_new_block_index(app_state: &AppState) -> Result<(), MainError> { "Binary fuse xor filter built" ); - serialized - }; + Ok(serialized) + })?; tracing::debug!("Storing binary fuse xor filter in db"); // TODO: store filter in db