diff --git a/chain/src/chain.rs b/chain/src/chain.rs index 16fcf285..026544a9 100644 --- a/chain/src/chain.rs +++ b/chain/src/chain.rs @@ -339,11 +339,7 @@ impl Chain { } /// Process a block header received during "header first" propagation. - pub fn process_block_header( - &self, - bh: &BlockHeader, - opts: Options, - ) -> Result, Error> { + pub fn process_block_header(&self, bh: &BlockHeader, opts: Options) -> Result<(), Error> { let header_head = self.get_header_head()?; let ctx = self.ctx_from_head(header_head, opts); pipe::process_block_header(bh, ctx) diff --git a/chain/src/pipe.rs b/chain/src/pipe.rs index e343f0e8..0ca8b2b0 100644 --- a/chain/src/pipe.rs +++ b/chain/src/pipe.rs @@ -164,7 +164,9 @@ pub fn sync_block_header( } /// Process block header as part of "header first" block propagation. -pub fn process_block_header(bh: &BlockHeader, mut ctx: BlockContext) -> Result, Error> { +/// We validate the header but we do not store it or update header head based on this. +/// We will update these once we get the block back after requesting it. +pub fn process_block_header(bh: &BlockHeader, mut ctx: BlockContext) -> Result<(), Error> { debug!( LOGGER, "pipe: process_block_header: {} at {}", @@ -173,19 +175,7 @@ pub fn process_block_header(bh: &BlockHeader, mut ctx: BlockContext) -> Result