Process events instead of processing only transactions

Prep work to allow clients to send any type that can end up in
the ledger.
This commit is contained in:
Greg Fitzgerald
2018-05-07 14:51:08 -06:00
parent 880cb8e7cc
commit 893011c3ba
3 changed files with 39 additions and 24 deletions

View File

@@ -103,7 +103,13 @@ fn main() {
let mut last_id = entry1.id;
for entry in entries {
last_id = entry.id;
acc.process_verified_events(entry.events).unwrap();
let results = acc.process_verified_events(entry.events);
for result in results {
if let Err(e) = result {
eprintln!("failed to process event {:?}", e);
exit(1);
}
}
acc.register_entry_id(&last_id);
}