Skip to content

Commit 264f367

Browse files
committed
nits by val
1 parent 8c588cf commit 264f367

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ pub enum PendingHTLCRouting {
121121
},
122122
/// An HTLC paid to an invoice (supposedly) generated by us.
123123
/// At this point, we have not checked that the invoice being paid was actually generated by us,
124-
/// but rather its claiming to pay an invoice of ours.
124+
/// but rather it's claiming to pay an invoice of ours.
125125
Receive {
126126
/// Payment secret and total msat received.
127127
payment_data: msgs::FinalOnionHopData,
@@ -141,8 +141,8 @@ pub enum PendingHTLCRouting {
141141
ReceiveKeysend {
142142
/// This was added in 0.0.116 and will break deserialization on downgrades.
143143
payment_data: Option<msgs::FinalOnionHopData>,
144-
/// Preimage for this onion payment. This preimage will be used in the invoice
145-
/// generated and immediately settled for the spontaneous payment.
144+
/// Preimage for this onion payment. This preimage is provided by the sender and will be
145+
/// used to settle the spontaneous payment.
146146
payment_preimage: PaymentPreimage,
147147
/// See [`RecipientOnionFields::payment_metadata`] for more info.
148148
payment_metadata: Option<Vec<u8>>,
@@ -160,9 +160,9 @@ pub struct PendingHTLCInfo {
160160
/// Further routing details based on whether the HTLC is being forwarded or received.
161161
pub routing: PendingHTLCRouting,
162162
/// Shared secret from the previous hop.
163-
/// Used to obfuscate any corresponding return packets back to the previous hop.
163+
/// Used encrypt failure packets in the event that the HTLC needs to be failed backwards.
164164
pub incoming_shared_secret: [u8; 32],
165-
/// Hash of the payment preimage. Used to cross-lock the payment across the hop.
165+
/// Hash of the payment preimage, to lock the payment until the receiver releases the preimage.
166166
pub payment_hash: PaymentHash,
167167
/// Amount offered by this HTLC.
168168
pub incoming_amt_msat: Option<u64>, // Added in 0.0.113

lightning/src/ln/onion_payment.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Utilities for channelmanager.rs
22
//!
3-
//! Includes a public peel_payment_onion function for use by external projects or libraries.
3+
//! Includes a public [`peel_payment_onion`] function for use by external projects or libraries.
44
55
use bitcoin::hashes::Hash;
66
use bitcoin::hashes::sha256::Hash as Sha256;
@@ -379,8 +379,8 @@ mod tests {
379379
use crate::ln::ChannelId;
380380
use crate::ln::channelmanager::RecipientOnionFields;
381381
use crate::ln::features::{ChannelFeatures, NodeFeatures};
382-
use crate::ln::msgs;
383-
use crate::ln::onion_utils::create_payment_onion;
382+
use crate::ln::msgs;
383+
use crate::ln::onion_utils::create_payment_onion;
384384
use crate::routing::router::{Path, RouteHop};
385385
use crate::util::test_utils;
386386

@@ -496,4 +496,4 @@ mod tests {
496496
prng_seed, hops, recipient_amount, pay_secret)
497497
}
498498

499-
}
499+
}

0 commit comments

Comments
 (0)