Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
a36c85a
Trivial: document some fields on MonitorRestoreUpdates
valentinewallace Jan 5, 2026
56b9f41
De-dup decode_htlcs from monitor only if channel is closed
valentinewallace Jan 16, 2026
7304cc9
Simplify channel_closed check on manager read
valentinewallace Feb 2, 2026
37375ca
Don't double-forward inbounds resolved in holding cell
valentinewallace Jan 29, 2026
a5c8bce
Mark legacy pre-0.3 inbound htlcs on persist
valentinewallace Jan 21, 2026
3cc64f0
Prune inbound HTLC onions once forwarded
valentinewallace Jan 5, 2026
d435e5b
Deterministic reconstruct_manager option in tests
valentinewallace Feb 2, 2026
30dbf40
Trivially refactor reload_node macro
valentinewallace Feb 3, 2026
979d564
Check pruned HTLCs were resolved on startup
valentinewallace Jan 23, 2026
0ca79af
Support deleting legacy forward map persistence in 0.5
valentinewallace Jan 16, 2026
3b75eee
Fix docs on ChannelMonitor::payment_preimages
valentinewallace Feb 6, 2026
ee4fda3
Trivial: full path in reload_node macro
valentinewallace Feb 6, 2026
77d2604
Update upgrade tests: 0.2- to 0.5 doesn't work
valentinewallace Feb 6, 2026
7c79e67
Elide legacy manager pending HTLC maps on read/write
valentinewallace Jan 16, 2026
0127fb7
Remove now-unused reconstruct_manager test arg
valentinewallace Feb 3, 2026
71fd399
Pass logger into FundedChannel::read
valentinewallace Jan 6, 2026
27c450e
Remove deprecated InboundHTLCResolution::Resolved variant
valentinewallace Jan 6, 2026
eebbbca
Simplify InboundHTLCStates' htlc resolution type
valentinewallace Jan 6, 2026
b046612
Remove now-unused InboundUpdateAdd::Legacy
valentinewallace Jan 28, 2026
87a33b8
Remove now-unused param from monitor_updating_paused
valentinewallace Jan 6, 2026
8660165
Delete now-unused ChannelContext::monitor_pending_forwards
valentinewallace Jan 6, 2026
f79003e
Delete now-unused MonitorRestoreUpdates::accepted_htlcs
valentinewallace Jan 6, 2026
2170910
Delete now-unused PendingHTLCStatus
valentinewallace Jan 7, 2026
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
1 change: 1 addition & 0 deletions lightning-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ lightning-types = { path = "../lightning-types", features = ["_test_utils"] }
lightning-invoice = { path = "../lightning-invoice", default-features = false }
lightning-macros = { path = "../lightning-macros" }
lightning = { path = "../lightning", features = ["_test_utils"] }
lightning_0_3 = { package = "lightning", git = "https://github.com/valentinewallace/rust-lightning", branch = "2026-02-dedup-htlc-fwd-data", features = ["_test_utils"] }
lightning_0_2 = { package = "lightning", version = "0.2.0", features = ["_test_utils"] }
lightning_0_1 = { package = "lightning", version = "0.1.7", features = ["_test_utils"] }
lightning_0_0_125 = { package = "lightning", version = "0.0.125", features = ["_test_utils"] }
Expand Down
1 change: 0 additions & 1 deletion lightning-tests/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#[cfg_attr(test, macro_use)]
extern crate lightning;

#[cfg(all(test, not(taproot)))]
Expand Down
904 changes: 814 additions & 90 deletions lightning-tests/src/upgrade_downgrade_tests.rs

Large diffs are not rendered by default.

19 changes: 10 additions & 9 deletions lightning/src/chain/channelmonitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1256,18 +1256,19 @@ pub(crate) struct ChannelMonitorImpl<Signer: EcdsaChannelSigner> {
// deserialization
current_holder_commitment_number: u64,

/// The set of payment hashes from inbound payments for which we know the preimage. Payment
/// preimages that are not included in any unrevoked local commitment transaction or unrevoked
/// remote commitment transactions are automatically removed when commitment transactions are
/// revoked. Note that this happens one revocation after it theoretically could, leaving
/// preimages present here for the previous state even when the channel is "at rest". This is a
/// good safety buffer, but also is important as it ensures we retain payment preimages for the
/// previous local commitment transaction, which may have been broadcast already when we see
/// the revocation (in setups with redundant monitors).
/// The set of payment hashes from inbound payments and forwards for which we know the preimage.
/// Payment preimages that are not included in any unrevoked local commitment transaction or
/// unrevoked remote commitment transactions are automatically removed when commitment
/// transactions are revoked. Note that this happens one revocation after it theoretically could,
/// leaving preimages present here for the previous state even when the channel is "at rest".
/// This is a good safety buffer, but also is important as it ensures we retain payment preimages
/// for the previous local commitment transaction, which may have been broadcast already when we
/// see the revocation (in setups with redundant monitors).
///
/// We also store [`PaymentClaimDetails`] here, tracking the payment information(s) for this
/// preimage for inbound payments. This allows us to rebuild the inbound payment information on
/// startup even if we lost our `ChannelManager`.
/// startup even if we lost our `ChannelManager`. For forwardeds, the list of
/// [`PaymentClaimDetails`] is empty.
payment_preimages: HashMap<PaymentHash, (PaymentPreimage, Vec<PaymentClaimDetails>)>,

// Note that `MonitorEvent`s MUST NOT be generated during update processing, only generated
Expand Down
Loading
Loading