fix: off by one

This commit is contained in:
Ludo Galabru
2023-04-17 10:00:57 -04:00
parent 117e41eae8
commit abf70e7204
2 changed files with 4 additions and 4 deletions

View File

@@ -762,7 +762,7 @@ pub async fn fetch_and_cache_blocks_in_hord_db(
.expect("unable to spawn thread");
let mut blocks_stored = 0;
let mut cursor = 1 + start_block as usize;
let mut cursor = start_block as usize;
let mut inbox = HashMap::new();
let mut num_writes = 0;
@@ -801,7 +801,7 @@ pub async fn fetch_and_cache_blocks_in_hord_db(
&ctx,
) {
ctx.try_log(|logger| {
slog::error!(logger, "Unable to augment bitcoin block with hord_db: {e}",)
slog::error!(logger, "Unable to augment bitcoin block {} with hord_db: {e}", new_block.block_identifier.index)
});
return Err(e);
}

View File

@@ -699,7 +699,7 @@ pub async fn start_observer_commands_handler(
ctx.try_log(|logger| {
slog::error!(
logger,
"Unable to augment bitcoin block with hord_db: {e}",
"Unable to insert bitcoin block {} in hord_db: {e}", block.block_identifier.index
)
});
}
@@ -832,7 +832,7 @@ pub async fn start_observer_commands_handler(
ctx.try_log(|logger| {
slog::error!(
logger,
"Unable to augment bitcoin block with hord_db: {e}",
"Unable to apply bitcoin block {} with hord_db: {e}", block.block_identifier.index
)
});
}