@@ -343,7 +343,7 @@ pub enum Event {
343
343
/// [`ChannelManager::fail_htlc_backwards`]: crate::ln::channelmanager::ChannelManager::fail_htlc_backwards
344
344
PaymentReceived {
345
345
/// The node that recieved the payment, ie our node
346
- our_node_id : Option < PublicKey > ,
346
+ our_node_id : PublicKey ,
347
347
/// The hash for which the preimage should be handed to the ChannelManager. Note that LDK will
348
348
/// not stop you from registering duplicate payment hashes for inbound payments.
349
349
payment_hash : PaymentHash ,
@@ -369,7 +369,7 @@ pub enum Event {
369
369
/// [`ChannelManager::claim_funds`]: crate::ln::channelmanager::ChannelManager::claim_funds
370
370
PaymentClaimed {
371
371
/// The node that recieved the payment, ie our node
372
- our_node_id : Option < PublicKey > ,
372
+ our_node_id : PublicKey ,
373
373
/// The payment hash of the claimed payment. Note that LDK will not stop you from
374
374
/// registering duplicate payment hashes for inbound payments.
375
375
payment_hash : PaymentHash ,
@@ -762,7 +762,7 @@ impl Writeable for Event {
762
762
( 4 , amount_msat, required) ,
763
763
( 6 , 0u64 , required) , // user_payment_id required for compatibility with 0.0.103 and earlier
764
764
( 8 , payment_preimage, option) ,
765
- ( 10 , our_node_id, option ) ,
765
+ ( 10 , our_node_id, required ) ,
766
766
} ) ;
767
767
} ,
768
768
& Event :: PaymentSent { ref payment_id, ref payment_preimage, ref payment_hash, ref fee_paid_msat } => {
@@ -865,7 +865,7 @@ impl Writeable for Event {
865
865
( 0 , payment_hash, required) ,
866
866
( 2 , purpose, required) ,
867
867
( 4 , amount_msat, required) ,
868
- ( 6 , our_node_id, option ) ,
868
+ ( 6 , our_node_id, required ) ,
869
869
} ) ;
870
870
} ,
871
871
& Event :: ProbeSuccessful { ref payment_id, ref payment_hash, ref path } => {
@@ -948,7 +948,7 @@ impl MaybeReadable for Event {
948
948
None => return Err ( msgs:: DecodeError :: InvalidValue ) ,
949
949
} ;
950
950
Ok ( Some ( Event :: PaymentReceived {
951
- our_node_id,
951
+ our_node_id : our_node_id . unwrap ( ) ,
952
952
payment_hash,
953
953
amount_msat,
954
954
purpose,
@@ -1131,12 +1131,12 @@ impl MaybeReadable for Event {
1131
1131
( 0 , payment_hash, required) ,
1132
1132
( 2 , purpose, ignorable) ,
1133
1133
( 4 , amount_msat, required) ,
1134
- ( 6 , our_node_id, option ) ,
1134
+ ( 6 , our_node_id, required ) ,
1135
1135
} ) ;
1136
1136
if purpose. is_none ( ) { return Ok ( None ) ; }
1137
1137
1138
1138
Ok ( Some ( Event :: PaymentClaimed {
1139
- our_node_id,
1139
+ our_node_id : our_node_id . unwrap ( ) ,
1140
1140
payment_hash,
1141
1141
purpose : purpose. unwrap ( ) ,
1142
1142
amount_msat,
0 commit comments