Skip to content

Commit e4ad167

Browse files
committed
Fix premature claims broadcast
A claim transaction with locktime T can only be mined at block heights of T+1 or above. Due to an off-by-one bug, we were broadcasting some claim transactions one block before they could actually be mined. AFAICT, nothing bad resulted from this bug -- later rebroadcasts of the transaction would eventually succeed once the correct height was reached.
1 parent abf72a5 commit e4ad167

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lightning/src/chain/onchaintx.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,7 @@ impl<ChannelSigner: EcdsaChannelSigner> OnchainTxHandler<ChannelSigner> {
756756
}
757757

758758
let package_locktime = req.package_locktime(cur_height);
759-
if package_locktime > cur_height + 1 {
759+
if package_locktime > cur_height {
760760
log_info!(logger, "Delaying claim of package until its timelock at {} (current height {}), the following outpoints are spent:", package_locktime, cur_height);
761761
for outpoint in req.outpoints() {
762762
log_info!(logger, " Outpoint {}", outpoint);

0 commit comments

Comments
 (0)