Skip to content

Commit 3294d45

Browse files
committed
Add a debug message if we catch an inconsistency in a TxBuilder impl
`TxBuilder` will eventually be a public trait, and this debug assertion could catch any inconsistencies in the implementations of this trait.
1 parent a954fff commit 3294d45

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lightning/src/ln/channel.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4624,7 +4624,7 @@ where
46244624
broadcaster_dust_limit_sat,
46254625
logger,
46264626
);
4627-
debug_assert_eq!(stats, self.build_commitment_stats(funding, local, generated_by_local, None, None));
4627+
debug_assert_eq!(stats, self.build_commitment_stats(funding, local, generated_by_local, None, None), "Caught an inconsistency between `TxBuilder::build_commitment_transaction` and the rest of the `TxBuilder` methods");
46284628

46294629
// This populates the HTLC-source table with the indices from the HTLCs in the commitment
46304630
// transaction.

0 commit comments

Comments
 (0)