f - Add TODO for using validate_pow result
[rust-lightning] / lightning-block-sync / src / poll.rs
index 933af2e5f8189912af21b7b5e060644c966de6f9..f0f5a0c8a3cc331531246ce4e545fdddbbbe74b8 100644 (file)
@@ -52,6 +52,7 @@ impl Validate for BlockHeaderData {
                        .validate_pow(&self.header.target())
                        .or_else(|e| Err(BlockSourceError::persistent(e)))?;
 
+               // TODO: Use the result of validate_pow instead of recomputing the block hash once upstream.
                if self.header.block_hash() != block_hash {
                        return Err(BlockSourceError::persistent("invalid block hash"));
                }
@@ -68,6 +69,7 @@ impl Validate for Block {
                        .validate_pow(&self.header.target())
                        .or_else(|e| Err(BlockSourceError::persistent(e)))?;
 
+               // TODO: Use the result of validate_pow instead of recomputing the block hash once upstream.
                if self.block_hash() != block_hash {
                        return Err(BlockSourceError::persistent("invalid block hash"));
                }