From 63d2b2eb42ef8180c6da195868cfbab9c099469b Mon Sep 17 00:00:00 2001 From: Rob Walker Date: Mon, 6 Aug 2018 10:09:43 -0700 Subject: [PATCH] adjust bank notion of entry_count to aid debugging --- src/bank.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bank.rs b/src/bank.rs index 01a55eaa3e..b7e6ccc2e4 100644 --- a/src/bank.rs +++ b/src/bank.rs @@ -407,7 +407,7 @@ impl Bank { { // Ledger verification needs to be parallelized, but we can't pull the whole // thing into memory. We therefore chunk it. - let mut entry_count = 0; + let mut entry_count = *tail_idx as u64; for block in &entries.into_iter().chunks(VERIFY_BLOCK_SIZE) { let block: Vec<_> = block.collect(); if !block.verify(&self.last_id()) { @@ -453,7 +453,7 @@ impl Bank { tail.push(entry0); tail.push(entry1); let mut tail_idx = 2; - let entry_count = 2 + self.process_blocks(entries, &mut tail, &mut tail_idx)?; + let entry_count = self.process_blocks(entries, &mut tail, &mut tail_idx)?; // check f we need to rotate tail if tail.len() == WINDOW_SIZE as usize {