File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,10 @@ impl PaymentDetails {
85
85
PaymentDirection :: Outbound ,
86
86
"We should only ever override payment hash for outbound BOLT 12 payments"
87
87
) ;
88
+ debug_assert ! (
89
+ hash. is_none( ) || * hash == hash_opt,
90
+ "We should never change a payment hash after being initially set"
91
+ ) ;
88
92
update_if_necessary ! ( * hash, hash_opt) ;
89
93
} ,
90
94
PaymentKind :: Bolt12Refund { ref mut hash, .. } => {
@@ -93,6 +97,10 @@ impl PaymentDetails {
93
97
PaymentDirection :: Outbound ,
94
98
"We should only ever override payment hash for outbound BOLT 12 payments"
95
99
) ;
100
+ debug_assert ! (
101
+ hash. is_none( ) || * hash == hash_opt,
102
+ "We should never change a payment hash after being initially set"
103
+ ) ;
96
104
update_if_necessary ! ( * hash, hash_opt) ;
97
105
} ,
98
106
_ => {
You can’t perform that action at this time.
0 commit comments