Skip to content

Commit 48a17c2

Browse files
committed
Rename claim cleaning match bool for accuracy
We don't actually care if a confirmed transaction claimed other outputs, only that it claimed a superset of the outputs in the pending claim we're looking at. Thus, the variable to detect that is renamed `is_claim_subset_of_tx` instead of `are_sets_equal`.
1 parent d35239c commit 48a17c2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lightning/src/chain/onchaintx.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -888,12 +888,12 @@ impl<ChannelSigner: EcdsaChannelSigner> OnchainTxHandler<ChannelSigner> {
888888
//... we need to verify equality between transaction outpoints and claim request
889889
// outpoints to know if transaction is the original claim or a bumped one issued
890890
// by us.
891-
let mut are_sets_equal = true;
891+
let mut is_claim_subset_of_tx = true;
892892
let mut tx_inputs = tx.input.iter().map(|input| &input.previous_output).collect::<Vec<_>>();
893893
tx_inputs.sort_unstable();
894894
for request_input in request.outpoints() {
895895
if tx_inputs.binary_search(&request_input).is_err() {
896-
are_sets_equal = false;
896+
is_claim_subset_of_tx = false;
897897
break;
898898
}
899899
}
@@ -915,7 +915,7 @@ impl<ChannelSigner: EcdsaChannelSigner> OnchainTxHandler<ChannelSigner> {
915915
// If this is our transaction (or our counterparty spent all the outputs
916916
// before we could anyway with same inputs order than us), wait for
917917
// ANTI_REORG_DELAY and clean the RBF tracking map.
918-
if are_sets_equal {
918+
if is_claim_subset_of_tx {
919919
clean_claim_request_after_safety_delay!();
920920
} else { // If false, generate new claim request with update outpoint set
921921
let mut at_least_one_drop = false;

0 commit comments

Comments
 (0)