@@ -30,7 +30,7 @@ use crate::types::payment::{PaymentPreimage, PaymentHash, PaymentSecret};
30
30
use crate :: offers:: invoice:: Bolt12Invoice ;
31
31
use crate :: onion_message:: messenger:: Responder ;
32
32
use crate :: routing:: gossip:: NetworkUpdate ;
33
- use crate :: routing:: router:: { BlindedTail , Path , RouteHop , RouteParameters } ;
33
+ use crate :: routing:: router:: { BlindedTail , Path , RouteHop , RouteParameters , TrampolineHop } ;
34
34
use crate :: sign:: SpendableOutputDescriptor ;
35
35
use crate :: util:: errors:: APIError ;
36
36
use crate :: util:: ser:: { BigSize , FixedLengthReader , Writeable , Writer , MaybeReadable , Readable , RequiredWrapper , UpgradableRequired , WithoutLength } ;
@@ -1185,12 +1185,12 @@ pub enum Event {
1185
1185
/// events generated or serialized by versions prior to 0.0.122.
1186
1186
next_user_channel_id : Option < u128 > ,
1187
1187
/// The node id of the previous node.
1188
- ///
1188
+ ///
1189
1189
/// This is only `None` for HTLCs received prior to 0.1 or for events serialized by
1190
1190
/// versions prior to 0.1
1191
1191
prev_node_id : Option < PublicKey > ,
1192
1192
/// The node id of the next node.
1193
- ///
1193
+ ///
1194
1194
/// This is only `None` for HTLCs received prior to 0.1 or for events serialized by
1195
1195
/// versions prior to 0.1
1196
1196
next_node_id : Option < PublicKey > ,
@@ -1584,6 +1584,7 @@ impl Writeable for Event {
1584
1584
( 9 , None :: <RouteParameters >, option) , // retry in LDK versions prior to 0.0.115
1585
1585
( 11 , payment_id, option) ,
1586
1586
( 13 , failure, required) ,
1587
+ ( 15 , path. trampoline_hops, required_vec) ,
1587
1588
} ) ;
1588
1589
} ,
1589
1590
& Event :: PendingHTLCsForwardable { time_forwardable : _ } => {
@@ -1919,6 +1920,7 @@ impl MaybeReadable for Event {
1919
1920
let mut network_update = None ;
1920
1921
let mut blinded_tail: Option < BlindedTail > = None ;
1921
1922
let mut path: Option < Vec < RouteHop > > = Some ( vec ! [ ] ) ;
1923
+ let mut trampoline_path: Option < Vec < TrampolineHop > > = Some ( vec ! [ ] ) ;
1922
1924
let mut short_channel_id = None ;
1923
1925
let mut payment_id = None ;
1924
1926
let mut failure_opt = None ;
@@ -1933,14 +1935,15 @@ impl MaybeReadable for Event {
1933
1935
( 7 , short_channel_id, option) ,
1934
1936
( 11 , payment_id, option) ,
1935
1937
( 13 , failure_opt, upgradable_option) ,
1938
+ ( 15 , trampoline_path, optional_vec) ,
1936
1939
} ) ;
1937
1940
let failure = failure_opt. unwrap_or_else ( || PathFailure :: OnPath { network_update } ) ;
1938
1941
Ok ( Some ( Event :: PaymentPathFailed {
1939
1942
payment_id,
1940
1943
payment_hash,
1941
1944
payment_failed_permanently,
1942
1945
failure,
1943
- path : Path { hops : path. unwrap ( ) , trampoline_hops : vec ! [ ] , blinded_tail } ,
1946
+ path : Path { hops : path. unwrap ( ) , trampoline_hops : trampoline_path . unwrap_or ( vec ! [ ] ) , blinded_tail } ,
1944
1947
short_channel_id,
1945
1948
#[ cfg( test) ]
1946
1949
error_code,
0 commit comments