diff --git a/chain/src/chain.rs b/chain/src/chain.rs index 03c93e3305..50f6dea96c 100644 --- a/chain/src/chain.rs +++ b/chain/src/chain.rs @@ -357,6 +357,7 @@ impl Chain { let batch = self.store.batch()?; let mut ctx = self.new_ctx(opts, batch, &mut txhashset)?; pipe::process_block_header(bh, &mut ctx)?; + ctx.batch.commit()?; Ok(()) } @@ -367,10 +368,8 @@ impl Chain { let mut txhashset = self.txhashset.write(); let batch = self.store.batch()?; let mut ctx = self.new_ctx(opts, batch, &mut txhashset)?; - pipe::sync_block_headers(headers, &mut ctx)?; ctx.batch.commit()?; - Ok(()) } diff --git a/chain/src/txhashset/txhashset.rs b/chain/src/txhashset/txhashset.rs index e9fc18f0b0..d2e7d272c0 100644 --- a/chain/src/txhashset/txhashset.rs +++ b/chain/src/txhashset/txhashset.rs @@ -1032,7 +1032,7 @@ impl<'a> Extension<'a> { /// Rewinds the MMRs to the provided block, rewinding to the last output pos /// and last kernel pos of that block. pub fn rewind(&mut self, header: &BlockHeader) -> Result<(), Error> { - debug!("Rewind to header {} at {}", header.hash(), header.height,); + debug!("Rewind extension to {} at {}", header.hash(), header.height,); // We need to build bitmaps of added and removed output positions // so we can correctly rewind all operations applied to the output MMR