Skip to content

Commit

Permalink
fix panic
Browse files Browse the repository at this point in the history
  • Loading branch information
SWvheerden committed Dec 5, 2024
1 parent 0b7135e commit f062c7e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sharechain/in_memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,7 @@ impl ShareChain for InMemoryShareChain {
};
if let Some(level) = p2_chain_read_lock.level_at_height(height) {
if let Some(block) = level.block_in_main_chain() {
let index = i_have_blocks.len() - counter;
let index = i_have_blocks.len() - counter - 1;
i_have_blocks[index] = (height, block.hash);
counter += 1;
}
Expand Down

0 comments on commit f062c7e

Please sign in to comment.