@@ -250,7 +250,7 @@ pub enum Event {
250
250
/// [`ChannelManager::fail_htlc_backwards`]: crate::ln::channelmanager::ChannelManager::fail_htlc_backwards
251
251
PaymentReceived {
252
252
/// The node that recieved the payment, ie our node
253
- our_node_id : Option < PublicKey > ,
253
+ our_node_id : PublicKey ,
254
254
/// The hash for which the preimage should be handed to the ChannelManager. Note that LDK will
255
255
/// not stop you from registering duplicate payment hashes for inbound payments.
256
256
payment_hash : PaymentHash ,
@@ -276,7 +276,7 @@ pub enum Event {
276
276
/// [`ChannelManager::claim_funds`]: crate::ln::channelmanager::ChannelManager::claim_funds
277
277
PaymentClaimed {
278
278
/// The node that recieved the payment, ie our node
279
- our_node_id : Option < PublicKey > ,
279
+ our_node_id : PublicKey ,
280
280
/// The payment hash of the claimed payment. Note that LDK will not stop you from
281
281
/// registering duplicate payment hashes for inbound payments.
282
282
payment_hash : PaymentHash ,
@@ -635,7 +635,7 @@ impl Writeable for Event {
635
635
( 4 , amount_msat, required) ,
636
636
( 6 , 0u64 , required) , // user_payment_id required for compatibility with 0.0.103 and earlier
637
637
( 8 , payment_preimage, option) ,
638
- ( 10 , our_node_id, option ) ,
638
+ ( 10 , our_node_id, required ) ,
639
639
} ) ;
640
640
} ,
641
641
& Event :: PaymentSent { ref payment_id, ref payment_preimage, ref payment_hash, ref fee_paid_msat } => {
@@ -732,7 +732,7 @@ impl Writeable for Event {
732
732
( 0 , payment_hash, required) ,
733
733
( 2 , purpose, required) ,
734
734
( 4 , amount_msat, required) ,
735
- ( 6 , our_node_id, option ) ,
735
+ ( 6 , our_node_id, required ) ,
736
736
} ) ;
737
737
} ,
738
738
& Event :: ProbeSuccessful { ref payment_id, ref payment_hash, ref path } => {
@@ -797,7 +797,7 @@ impl MaybeReadable for Event {
797
797
None => return Err ( msgs:: DecodeError :: InvalidValue ) ,
798
798
} ;
799
799
Ok ( Some ( Event :: PaymentReceived {
800
- our_node_id,
800
+ our_node_id : our_node_id . unwrap ( ) ,
801
801
payment_hash,
802
802
amount_msat,
803
803
purpose,
@@ -972,12 +972,12 @@ impl MaybeReadable for Event {
972
972
( 0 , payment_hash, required) ,
973
973
( 2 , purpose, ignorable) ,
974
974
( 4 , amount_msat, required) ,
975
- ( 6 , our_node_id, option ) ,
975
+ ( 6 , our_node_id, required ) ,
976
976
} ) ;
977
977
if purpose. is_none ( ) { return Ok ( None ) ; }
978
978
979
979
Ok ( Some ( Event :: PaymentClaimed {
980
- our_node_id,
980
+ our_node_id : our_node_id . unwrap ( ) ,
981
981
payment_hash,
982
982
purpose : purpose. unwrap ( ) ,
983
983
amount_msat,
0 commit comments