From 684f4c59e0b6d5eeb28cb27ff152f276320f7837 Mon Sep 17 00:00:00 2001 From: Greg Fitzgerald Date: Fri, 2 Mar 2018 08:51:27 -0700 Subject: [PATCH] Delete commented out code accountant crate shouldn't verify the log. Instead, it should only add valid entries and leave verification to network nodes. --- src/accountant.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/accountant.rs b/src/accountant.rs index bf2a4a302b..98e2d82dda 100644 --- a/src/accountant.rs +++ b/src/accountant.rs @@ -57,14 +57,11 @@ impl Accountant { while let Ok(entry) = self.historian.receiver.try_recv() { entries.push(entry); } - // TODO: Does this cause the historian's channel to get blocked? - //use log::verify_slice_u64; - //println!("accountant: verifying {} entries...", entries.len()); - //assert!(verify_slice_u64(&entries, &self.end_hash)); - //println!("accountant: Done verifying {} entries.", entries.len()); + if let Some(last_entry) = entries.last() { self.end_hash = last_entry.end_hash; } + for e in &entries { self.process_event(&e.event); }