Have the TendermintMachine domain-separate by genesis

Enbables support for multiple machines over the same DB.
This commit is contained in:
Luke Parker
2024-03-08 01:15:10 -05:00
parent 0d569ff7a3
commit 454bebaa77
4 changed files with 19 additions and 1 deletions

View File

@@ -218,7 +218,15 @@ impl<D: Db, T: TransactionTrait, P: P2p> Tributary<D, T, P> {
TendermintNetwork { genesis, signer, validators, blockchain, to_rebroadcast, p2p };
let TendermintHandle { synced_block, synced_block_result, messages, machine } =
TendermintMachine::new(db.clone(), network.clone(), block_number, start_time, proposal).await;
TendermintMachine::new(
db.clone(),
network.clone(),
genesis,
block_number,
start_time,
proposal,
)
.await;
tokio::spawn(machine.run());
Some(Self {