You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let payment_preimage = match inbound_payment::verify(payment_hash, payment_data.clone(),self.highest_seen_timestamp.load(Ordering::Acquire)asu64,&self.inbound_payment_key,&self.logger){
3203
+
let payment_preimage = match inbound_payment::verify(payment_hash,&payment_data,self.highest_seen_timestamp.load(Ordering::Acquire)asu64,&self.inbound_payment_key,&self.logger){
3204
3204
Ok(payment_preimage) => payment_preimage,
3205
3205
Err(()) => {
3206
3206
fail_htlc!(claimable_htlc);
@@ -7319,15 +7319,15 @@ mod tests {
7319
7319
// payment verification fails as expected.
7320
7320
letmut bad_payment_hash = payment_hash.clone();
7321
7321
bad_payment_hash.0[0] += 1;
7322
-
match inbound_payment::verify(bad_payment_hash, payment_data.clone(), nodes[0].node.highest_seen_timestamp.load(Ordering::Acquire)asu64,&nodes[0].node.inbound_payment_key,&nodes[0].logger){
7322
+
match inbound_payment::verify(bad_payment_hash,&payment_data, nodes[0].node.highest_seen_timestamp.load(Ordering::Acquire)asu64,&nodes[0].node.inbound_payment_key,&nodes[0].logger){
7323
7323
Ok(_) => panic!("Unexpected ok"),
7324
7324
Err(()) => {
7325
7325
nodes[0].logger.assert_log_contains("lightning::ln::inbound_payment".to_string(),"Failing HTLC with user-generated payment_hash".to_string(),1);
7326
7326
}
7327
7327
}
7328
7328
7329
7329
// Check that using the original payment hash succeeds.
0 commit comments