Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lightning/src/chain/onchaintx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1036,8 +1036,10 @@ impl<ChannelSigner: WriteableEcdsaChannelSigner> OnchainTxHandler<ChannelSigner>
}
}
for ((_package_id, _), ref mut request) in bump_candidates.iter_mut() {
// `height` is the height being disconnected, so our `current_height` is 1 lower.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trying to claim at next block connection works well, until a user calls invalidateblock and break this assumption, I think (though it’s a quite unorthodox uses of the consensus engine).

let current_height = height - 1;
if let Some((new_timer, new_feerate, bump_claim)) = self.generate_claim(
height, &request, true /* force_feerate_bump */, fee_estimator, &&*logger
current_height, &request, true /* force_feerate_bump */, fee_estimator, &&*logger
) {
request.set_timer(new_timer);
request.set_feerate(new_feerate);
Expand Down