We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ce91cc commit c7b533dCopy full SHA for c7b533d
lightning-block-sync/src/poll.rs
@@ -64,6 +64,10 @@ impl Validate for Block {
64
type T = ValidatedBlock;
65
66
fn validate(self, block_hash: BlockHash) -> BlockSourceResult<Self::T> {
67
+ self.header
68
+ .validate_pow(&self.header.target())
69
+ .or_else(|e| Err(BlockSourceError::persistent(e)))?;
70
+
71
if self.block_hash() != block_hash {
72
return Err(BlockSourceError::persistent("invalid block hash"));
73
}
0 commit comments