Add a test for Tributary

Further fleshes out the Tributary testing code.
This commit is contained in:
Luke Parker
2023-04-22 22:27:12 -04:00
parent 8c74576cf0
commit af84b7f707
9 changed files with 185 additions and 39 deletions

View File

@@ -82,6 +82,7 @@ impl<P: P2p> P2p for Arc<P> {
}
}
#[derive(Clone)]
pub struct Tributary<D: Db, T: Transaction, P: P2p> {
network: TendermintNetwork<D, T, P>,
@@ -123,6 +124,10 @@ impl<D: Db, T: Transaction, P: P2p> Tributary<D, T, P> {
Some(Self { network, synced_block, messages })
}
pub fn block_time() -> u32 {
TendermintNetwork::<D, T, P>::block_time()
}
pub fn genesis(&self) -> [u8; 32] {
self.network.blockchain.read().unwrap().genesis()
}