Remove redundant return value

And don't log the same error twice.
This commit is contained in:
Greg Fitzgerald 2018-09-02 23:48:11 -10:00
parent d18ea501b7
commit d5ef18337c
2 changed files with 3 additions and 9 deletions

View File

@ -453,13 +453,11 @@ impl Bank {
}
/// Process an ordered list of entries.
pub fn process_entries(&self, entries: Vec<Entry>) -> Result<u64> {
let mut entry_count = 0;
pub fn process_entries(&self, entries: Vec<Entry>) -> Result<()> {
for entry in entries {
entry_count += 1;
self.process_entry(entry)?;
}
Ok(entry_count)
Ok(())
}
/// Append entry blocks to the ledger, verifying them along the way.

View File

@ -62,11 +62,7 @@ impl ReplicateStage {
ledger_writer.write_entries(entries)?;
}
if res.is_err() {
error!("process_entries {:?}", res);
}
let _ = res?;
res?;
Ok(())
}
pub fn new(