+ macro_rules! get_payment_preimage_hash {
+ ($node: expr) => {
+ {
+ let payment_preimage = [*$node.network_payment_count.borrow(); 32];
+ *$node.network_payment_count.borrow_mut() += 1;
+ let mut payment_hash = [0; 32];
+ let mut sha = Sha256::new();
+ sha.input(&payment_preimage[..]);
+ sha.result(&mut payment_hash);
+ (payment_preimage, payment_hash)
+ }
+ }
+ }
+