@@ -405,7 +405,7 @@ pub fn do_test(data: &[u8]) {
405
405
406
406
loop {
407
407
macro_rules! send_payment {
408
- ( $source: expr, $dest: expr) => { {
408
+ ( $source: expr, $dest: expr, $amt : expr ) => { {
409
409
let payment_hash = Sha256 :: hash( & [ payment_id; 1 ] ) ;
410
410
payment_id = payment_id. wrapping_add( 1 ) ;
411
411
if let Err ( _) = $source. send_payment( Route {
@@ -414,15 +414,15 @@ pub fn do_test(data: &[u8]) {
414
414
node_features: NodeFeatures :: empty( ) ,
415
415
short_channel_id: $dest. 1 ,
416
416
channel_features: ChannelFeatures :: empty( ) ,
417
- fee_msat: 5000000 ,
417
+ fee_msat: $amt ,
418
418
cltv_expiry_delta: 200 ,
419
419
} ] ,
420
420
} , PaymentHash ( payment_hash. into_inner( ) ) ) {
421
421
// Probably ran out of funds
422
422
test_return!( ) ;
423
423
}
424
424
} } ;
425
- ( $source: expr, $middle: expr, $dest: expr) => { {
425
+ ( $source: expr, $middle: expr, $dest: expr, $amt : expr ) => { {
426
426
let payment_hash = Sha256 :: hash( & [ payment_id; 1 ] ) ;
427
427
payment_id = payment_id. wrapping_add( 1 ) ;
428
428
if let Err ( _) = $source. send_payment( Route {
@@ -438,7 +438,7 @@ pub fn do_test(data: &[u8]) {
438
438
node_features: NodeFeatures :: empty( ) ,
439
439
short_channel_id: $dest. 1 ,
440
440
channel_features: ChannelFeatures :: empty( ) ,
441
- fee_msat: 5000000 ,
441
+ fee_msat: $amt ,
442
442
cltv_expiry_delta: 200 ,
443
443
} ] ,
444
444
} , PaymentHash ( payment_hash. into_inner( ) ) ) {
@@ -646,12 +646,12 @@ pub fn do_test(data: &[u8]) {
646
646
nodes[ 2 ] . channel_monitor_updated ( & chan_2_funding, * id) ;
647
647
}
648
648
} ,
649
- 0x09 => send_payment ! ( nodes[ 0 ] , ( & nodes[ 1 ] , chan_a) ) ,
650
- 0x0a => send_payment ! ( nodes[ 1 ] , ( & nodes[ 0 ] , chan_a) ) ,
651
- 0x0b => send_payment ! ( nodes[ 1 ] , ( & nodes[ 2 ] , chan_b) ) ,
652
- 0x0c => send_payment ! ( nodes[ 2 ] , ( & nodes[ 1 ] , chan_b) ) ,
653
- 0x0d => send_payment ! ( nodes[ 0 ] , ( & nodes[ 1 ] , chan_a) , ( & nodes[ 2 ] , chan_b) ) ,
654
- 0x0e => send_payment ! ( nodes[ 2 ] , ( & nodes[ 1 ] , chan_b) , ( & nodes[ 0 ] , chan_a) ) ,
649
+ 0x09 => send_payment ! ( nodes[ 0 ] , ( & nodes[ 1 ] , chan_a) , 5000000 ) ,
650
+ 0x0a => send_payment ! ( nodes[ 1 ] , ( & nodes[ 0 ] , chan_a) , 5000000 ) ,
651
+ 0x0b => send_payment ! ( nodes[ 1 ] , ( & nodes[ 2 ] , chan_b) , 5000000 ) ,
652
+ 0x0c => send_payment ! ( nodes[ 2 ] , ( & nodes[ 1 ] , chan_b) , 5000000 ) ,
653
+ 0x0d => send_payment ! ( nodes[ 0 ] , ( & nodes[ 1 ] , chan_a) , ( & nodes[ 2 ] , chan_b) , 5000000 ) ,
654
+ 0x0e => send_payment ! ( nodes[ 2 ] , ( & nodes[ 1 ] , chan_b) , ( & nodes[ 0 ] , chan_a) , 5000000 ) ,
655
655
0x0f => {
656
656
if !chan_a_disconnected {
657
657
nodes[ 0 ] . peer_disconnected ( & nodes[ 1 ] . get_our_node_id ( ) , false ) ;
@@ -734,6 +734,12 @@ pub fn do_test(data: &[u8]) {
734
734
nodes[ 2 ] = node_c. clone ( ) ;
735
735
monitor_c = new_monitor_c;
736
736
} ,
737
+ 0x22 => send_payment ! ( nodes[ 0 ] , ( & nodes[ 1 ] , chan_a) , 20 ) ,
738
+ 0x23 => send_payment ! ( nodes[ 1 ] , ( & nodes[ 0 ] , chan_a) , 20 ) ,
739
+ 0x25 => send_payment ! ( nodes[ 1 ] , ( & nodes[ 2 ] , chan_b) , 20 ) ,
740
+ 0x26 => send_payment ! ( nodes[ 2 ] , ( & nodes[ 1 ] , chan_b) , 20 ) ,
741
+ 0x27 => send_payment ! ( nodes[ 0 ] , ( & nodes[ 1 ] , chan_a) , ( & nodes[ 2 ] , chan_b) , 20 ) ,
742
+ 0x28 => send_payment ! ( nodes[ 2 ] , ( & nodes[ 1 ] , chan_b) , ( & nodes[ 0 ] , chan_a) , 20 ) ,
737
743
// 0x24 defined above
738
744
_ => test_return ! ( ) ,
739
745
}
0 commit comments