mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-02-24 23:08:36 +01:00
Fix full_stack_target mishandling of block disconnection
This commit is contained in:
parent
5aa95baa8d
commit
865267ac68
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue