We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
debug_assert
1 parent cd8958f commit d92a568Copy full SHA for d92a568
1 file changed
src/payment/store.rs
@@ -85,6 +85,10 @@ impl PaymentDetails {
85
PaymentDirection::Outbound,
86
"We should only ever override payment hash for outbound BOLT 12 payments"
87
);
88
+ debug_assert!(
89
+ hash.is_none() || *hash == hash_opt,
90
+ "We should never change a payment hash after being initially set"
91
+ );
92
update_if_necessary!(*hash, hash_opt);
93
},
94
PaymentKind::Bolt12Refund { ref mut hash, .. } => {
@@ -93,6 +97,10 @@ impl PaymentDetails {
97
98
95
99
100
101
102
103
96
104
105
106
_ => {
0 commit comments