From 9fa7505e471be080078d1ae931e74a8bb29b60f4 Mon Sep 17 00:00:00 2001 From: Jeffrey Czyz Date: Thu, 18 Feb 2021 13:33:14 -0800 Subject: [PATCH] f - Add TODO for using validate_pow result --- lightning-block-sync/src/poll.rs | 2 ++ 1 file changed, 2 insertions(+) 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")); } -- 2.39.5