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

View File

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