Implement block proposal logic

This commit is contained in:
Luke Parker
2022-10-21 23:36:24 -04:00
parent adfc9a5d1d
commit bf5bdb89c2
9 changed files with 91 additions and 23 deletions

View File

@@ -113,7 +113,11 @@ impl Network for TestNetwork {
block.valid
}
fn add_block(&mut self, block: TestBlock, commit: Commit<TestSignatureScheme>) -> TestBlock {
async fn add_block(
&mut self,
block: TestBlock,
commit: Commit<TestSignatureScheme>,
) -> TestBlock {
dbg!("Adding ", &block);
assert!(block.valid.is_ok());
assert!(self.verify_commit(block.id(), &commit));