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
// Ensure that if the payment hash given to `inbound_payment::verify` differs from the original,
6888
+
// payment verification fails as expected.
6889
+
letmut bad_payment_hash = payment_hash.clone();
6890
+
bad_payment_hash.0[0] += 1;
6891
+
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){
6892
+
Ok(_) => panic!("Unexpected ok"),
6893
+
Err(()) => {
6894
+
nodes[0].logger.assert_log_contains("lightning::ln::channelmanager::inbound_payment".to_string(),"Failing HTLC with user-generated payment_hash".to_string(),1);
6895
+
}
6896
+
}
6897
+
6898
+
// Check that using the original payment hash succeeds.
0 commit comments