Tell verifiers when not to parallelize accounting

Without this patch, many batches of transactions could be tossed
into a single entry, but the parallelized accountant can only
guarentee the transactions in the batch can be processed in
parallel.

This patch signals the historian to generate a new Entry after
each batch. Validators must maintain sequential consistency
across Entries.
This commit is contained in:
Greg Fitzgerald
2018-04-12 20:53:34 -06:00
parent 9b12a79c8d
commit 0a30bd74c1
3 changed files with 82 additions and 5 deletions

View File

@@ -53,9 +53,7 @@ fn main() {
let mut last_id = entry1.id;
for entry in entries {
last_id = entry.id;
for event in entry.events {
acc.process_verified_event(&event).unwrap();
}
acc.process_verified_events(entry.events).unwrap();
}
let historian = Historian::new(&last_id, Some(1000));