@@ -11,6 +11,7 @@ use bitcoin::secp256k1::{KeyPair, PublicKey, Secp256k1, SecretKey, self};
11
11
use crate :: utils:: test_logger;
12
12
use core:: convert:: TryFrom ;
13
13
use lightning:: blinded_path:: BlindedPath ;
14
+ use lightning:: blinded_path:: message:: ForwardNode ;
14
15
use lightning:: sign:: EntropySource ;
15
16
use lightning:: ln:: PaymentHash ;
16
17
use lightning:: ln:: features:: BlindedHopFeatures ;
@@ -62,9 +63,19 @@ fn build_response<T: secp256k1::Signing + secp256k1::Verification>(
62
63
refund : & Refund , signing_pubkey : PublicKey , secp_ctx : & Secp256k1 < T >
63
64
) -> Result < UnsignedBolt12Invoice , Bolt12SemanticError > {
64
65
let entropy_source = Randomness { } ;
66
+ let intermediate_nodes = [
67
+ [
68
+ ForwardNode { node_id : pubkey ( 43 ) , short_channel_id : None } ,
69
+ ForwardNode { node_id : pubkey ( 44 ) , short_channel_id : None } ,
70
+ ] ,
71
+ [
72
+ ForwardNode { node_id : pubkey ( 45 ) , short_channel_id : None } ,
73
+ ForwardNode { node_id : pubkey ( 46 ) , short_channel_id : None } ,
74
+ ] ,
75
+ ] ;
65
76
let paths = vec ! [
66
- BlindedPath :: new_for_message( & [ pubkey ( 43 ) , pubkey( 44 ) , pubkey ( 42 ) ] , & entropy_source, secp_ctx) . unwrap( ) ,
67
- BlindedPath :: new_for_message( & [ pubkey ( 45 ) , pubkey( 46 ) , pubkey ( 42 ) ] , & entropy_source, secp_ctx) . unwrap( ) ,
77
+ BlindedPath :: new_for_message( & intermediate_nodes [ 0 ] , pubkey( 42 ) , & entropy_source, secp_ctx) . unwrap( ) ,
78
+ BlindedPath :: new_for_message( & intermediate_nodes [ 1 ] , pubkey( 42 ) , & entropy_source, secp_ctx) . unwrap( ) ,
68
79
] ;
69
80
70
81
let payinfo = vec ! [
0 commit comments