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:
@@ -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));
|
||||
|
Reference in New Issue
Block a user