rust-lightning/lightning
Matt Corallo 60f3c0a206 DRY the comparison blocks in update_claims_view_from_matched_txn
In `update_claims_view_from_matched_txn` we have two different
tx-equivalence checks which do the same thing - both check that the
tx which appeared on chain spent all of the outpoints which we
intended to spend in a given package. While one is more effecient
than the other (but only usable in a subset of cases), the
difference between O(N) and O(N^2) when N is 1-5 is trivial.

Still, it is possible we hit this code with just shy of 900 HTLC
outputs in a channel, and a transaction with a ton of inputs.

While having to spin through a few million entries if our
counterparty wastes a full block isn't really a big deal, we go
ahead and use a sorted vec and binary searches because its trivial.
2022-12-07 23:17:58 +00:00
..
src DRY the comparison blocks in update_claims_view_from_matched_txn 2022-12-07 23:17:58 +00:00
Cargo.toml Bump crate versions to 0.0.112/invoice 0.20 2022-10-24 18:53:58 +00:00