Expand blocktree processor options (#6248)

* Refactor blocktree processor args and support full leader cache

* Add entry callback option

* Rename num_threads to override_num_threads

* Add test for entry callback

* Refactor cached leader schedule changes

* Add tests for blocktree process options

* Refactor test

* @mvines feedback
This commit is contained in:
Justin Starry
2019-10-08 17:58:49 -04:00
committed by GitHub
parent 723f9a9b81
commit 5e31565574
7 changed files with 291 additions and 80 deletions

View File

@@ -417,8 +417,11 @@ fn get_bank_forks(
return blocktree_processor::process_blocktree_from_root(
blocktree,
Arc::new(deserialized_bank),
verify_ledger,
dev_halt_at_slot,
&blocktree_processor::ProcessOptions {
verify_ledger,
dev_halt_at_slot,
..blocktree_processor::ProcessOptions::default()
},
)
.expect("processing blocktree after loading snapshot failed");
} else {
@@ -433,8 +436,11 @@ fn get_bank_forks(
&genesis_block,
&blocktree,
account_paths,
verify_ledger,
dev_halt_at_slot,
blocktree_processor::ProcessOptions {
verify_ledger,
dev_halt_at_slot,
..blocktree_processor::ProcessOptions::default()
},
)
.expect("process_blocktree failed")
}