Skip to content

Commit 2e347d7

Browse files
committed
Fetch blocks from RPC instead of DB
1 parent 1f25de0 commit 2e347d7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/server/src/handlers.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,8 @@ async fn update_scan_status(
281281
if !limited_blocks.is_empty() && !blocks.is_empty() {
282282
let last_block = limited_blocks.last().unwrap();
283283
message.end = last_block.hash.clone();
284-
let q = shared.db_handler.get_blocks(last_block.sequence, last_block.sequence + 1).await?;
285-
start_hash = q[q.len() - 1].hash.clone();
284+
let q = shared.rpc_handler.get_blocks(last_block.sequence as u64, last_block.sequence as u64 + 1)?;
285+
start_hash = q.data.blocks[q.data.blocks.len() - 1].block.hash.clone();
286286
}
287287

288288
message.blocks = limited_blocks;

0 commit comments

Comments
 (0)