Skip to content

Commit 1ad5293

Browse files
committed
fix Include vout check as well in OutPoint check for shared input
1 parent a2ee699 commit 1ad5293

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lightning/src/ln/interactivetxs.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,9 @@ impl NegotiationContext {
638638
return Err(AbortReason::DuplicateFundingInput);
639639
}
640640
// Check if received shared input matches the expected
641-
if shared_funding_input.0.txid != *shared_txid {
641+
if !(shared_funding_input.0.txid == *shared_txid
642+
&& shared_funding_input.0.vout == msg.prevtx_out)
643+
{
642644
return Err(AbortReason::UnexpectedFundingInput);
643645
} else {
644646
let previous_output = OutPoint { txid: *shared_txid, vout: msg.prevtx_out };

0 commit comments

Comments
 (0)