From: Jeffrey Czyz Date: Thu, 18 Feb 2021 21:33:14 +0000 (-0800) Subject: f - Add TODO for using validate_pow result X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=9fa7505e471be080078d1ae931e74a8bb29b60f4;p=rust-lightning f - Add TODO for using validate_pow result --- diff --git a/lightning-block-sync/src/poll.rs b/lightning-block-sync/src/poll.rs index 933af2e5f..f0f5a0c8a 100644 --- a/lightning-block-sync/src/poll.rs +++ b/lightning-block-sync/src/poll.rs @@ -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")); }