Get the result of block importing

This commit is contained in:
Luke Parker
2022-10-22 01:43:07 -04:00
parent 8ed0f1f1cf
commit 193281e387
5 changed files with 63 additions and 13 deletions

View File

@@ -180,7 +180,7 @@ pub trait Network: Send + Sync {
async fn slash(&mut self, validator: Self::ValidatorId);
/// Validate a block.
fn validate(&mut self, block: &Self::Block) -> Result<(), BlockError>;
async fn validate(&mut self, block: &Self::Block) -> Result<(), BlockError>;
/// Add a block, returning the proposal for the next one. It's possible a block, which was never
/// validated or even failed validation, may be passed here if a supermajority of validators did
/// consider it valid and created a commit for it. This deviates from the paper which will have a