@@ -209,7 +209,7 @@ pub enum Event {
209
209
/// not stop you from registering duplicate payment hashes for inbound payments.
210
210
payment_hash : PaymentHash ,
211
211
/// The value, in thousandths of a satoshi, that this payment is for.
212
- amt : u64 ,
212
+ amount_msat : u64 ,
213
213
/// Information for claiming this received payment, based on whether the purpose of the
214
214
/// payment is to pay an invoice or to send a spontaneous payment.
215
215
purpose : PaymentPurpose ,
@@ -233,7 +233,7 @@ pub enum Event {
233
233
/// registering duplicate payment hashes for inbound payments.
234
234
payment_hash : PaymentHash ,
235
235
/// The value, in thousandths of a satoshi, that this payment is for.
236
- amt : u64 ,
236
+ amount_msat : u64 ,
237
237
/// The purpose of this claimed payment, i.e. whether the payment was for an invoice or a
238
238
/// spontaneous payment.
239
239
purpose : PaymentPurpose ,
@@ -508,7 +508,7 @@ impl Writeable for Event {
508
508
// We never write out FundingGenerationReady events as, upon disconnection, peers
509
509
// drop any channels which have not yet exchanged funding_signed.
510
510
} ,
511
- & Event :: PaymentReceived { ref payment_hash, ref amt , ref purpose } => {
511
+ & Event :: PaymentReceived { ref payment_hash, ref amount_msat , ref purpose } => {
512
512
1u8 . write ( writer) ?;
513
513
let mut payment_secret = None ;
514
514
let payment_preimage;
@@ -524,7 +524,7 @@ impl Writeable for Event {
524
524
write_tlv_fields ! ( writer, {
525
525
( 0 , payment_hash, required) ,
526
526
( 2 , payment_secret, option) ,
527
- ( 4 , amt , required) ,
527
+ ( 4 , amount_msat , required) ,
528
528
( 6 , 0u64 , required) , // user_payment_id required for compatibility with 0.0.103 and earlier
529
529
( 8 , payment_preimage, option) ,
530
530
} ) ;
@@ -617,12 +617,12 @@ impl Writeable for Event {
617
617
// We never write the OpenChannelRequest events as, upon disconnection, peers
618
618
// drop any channels which have not yet exchanged funding_signed.
619
619
} ,
620
- & Event :: PaymentClaimed { ref payment_hash, ref amt , ref purpose } => {
620
+ & Event :: PaymentClaimed { ref payment_hash, ref amount_msat , ref purpose } => {
621
621
19u8 . write ( writer) ?;
622
622
write_tlv_fields ! ( writer, {
623
623
( 0 , payment_hash, required) ,
624
624
( 2 , purpose, required) ,
625
- ( 4 , amt , required) ,
625
+ ( 4 , amount_msat , required) ,
626
626
} ) ;
627
627
} ,
628
628
// Note that, going forward, all new events must only write data inside of
@@ -643,12 +643,12 @@ impl MaybeReadable for Event {
643
643
let mut payment_hash = PaymentHash ( [ 0 ; 32 ] ) ;
644
644
let mut payment_preimage = None ;
645
645
let mut payment_secret = None ;
646
- let mut amt = 0 ;
646
+ let mut amount_msat = 0 ;
647
647
let mut _user_payment_id = None :: < u64 > ; // For compatibility with 0.0.103 and earlier
648
648
read_tlv_fields ! ( reader, {
649
649
( 0 , payment_hash, required) ,
650
650
( 2 , payment_secret, option) ,
651
- ( 4 , amt , required) ,
651
+ ( 4 , amount_msat , required) ,
652
652
( 6 , _user_payment_id, option) ,
653
653
( 8 , payment_preimage, option) ,
654
654
} ) ;
@@ -662,7 +662,7 @@ impl MaybeReadable for Event {
662
662
} ;
663
663
Ok ( Some ( Event :: PaymentReceived {
664
664
payment_hash,
665
- amt ,
665
+ amount_msat ,
666
666
purpose,
667
667
} ) )
668
668
} ;
@@ -829,17 +829,17 @@ impl MaybeReadable for Event {
829
829
let f = || {
830
830
let mut payment_hash = PaymentHash ( [ 0 ; 32 ] ) ;
831
831
let mut purpose = None ;
832
- let mut amt = 0 ;
832
+ let mut amount_msat = 0 ;
833
833
read_tlv_fields ! ( reader, {
834
834
( 0 , payment_hash, required) ,
835
835
( 2 , purpose, ignorable) ,
836
- ( 4 , amt , required) ,
836
+ ( 4 , amount_msat , required) ,
837
837
} ) ;
838
838
if purpose. is_none ( ) { return Ok ( None ) ; }
839
839
Ok ( Some ( Event :: PaymentClaimed {
840
840
payment_hash,
841
841
purpose : purpose. unwrap ( ) ,
842
- amt ,
842
+ amount_msat ,
843
843
} ) )
844
844
} ;
845
845
f ( )
0 commit comments