From 865267ac68d0ba72ed2d15bd6683447e8885d57e Mon Sep 17 00:00:00 2001 From: Antoine Riard Date: Fri, 17 Jan 2020 14:21:02 -0500 Subject: [PATCH] Fix full_stack_target mishandling of block disconnection --- fuzz/src/full_stack.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fuzz/src/full_stack.rs b/fuzz/src/full_stack.rs index 7e6135b5c..e6496125a 100644 --- a/fuzz/src/full_stack.rs +++ b/fuzz/src/full_stack.rs @@ -196,10 +196,10 @@ impl<'a> MoneyLossDetector<'a> { fn disconnect_block(&mut self) { if self.height > 0 && (self.max_height < 6 || self.height >= self.max_height - 6) { - self.height -= 1; let header = BlockHeader { version: 0x20000000, prev_blockhash: self.header_hashes[self.height], merkle_root: Default::default(), time: 42, bits: 42, nonce: 42 }; self.manager.block_disconnected(&header, self.height as u32); self.monitor.block_disconnected(&header, self.height as u32); + self.height -= 1; let removal_height = self.height; self.txids_confirmed.retain(|_, height| { removal_height != *height -- 2.39.5