Skip to content

Commit ea5de93

Browse files
authored
Merge pull request #2824 from shuoer86/main
Fix typos
2 parents 4b70921 + fff6616 commit ea5de93

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ Security
148148
--------
149149

150150
Security is the primary focus of `rust-lightning`; disclosure of security
151-
vulnerabilites helps prevent user loss of funds. If you believe a vulnerability
151+
vulnerabilities helps prevent user loss of funds. If you believe a vulnerability
152152
may affect other Lightning implementations, please inform them.
153153

154154
You can find further information on submitting (possible) vulnerabilities in the

lightning-invoice/src/ser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ impl<'a, W: WriteBase32> BytesToBase32<'a, W> {
5252
}
5353

5454
// Combine all bits from buffer with enough bits from this rounds byte so that they fill
55-
// a u5. Save reamining bits from byte to buffer.
55+
// a u5. Save remaining bits from byte to buffer.
5656
let from_buffer = self.buffer >> 3;
5757
let from_byte = byte >> (3 + self.buffer_bits); // buffer_bits <= 4
5858

lightning/src/ln/peer_handler.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1609,7 +1609,7 @@ impl<Descriptor: SocketDescriptor, CM: Deref, RM: Deref, OM: Deref, L: Deref, CM
16091609
}
16101610

16111611
if let wire::Message::GossipTimestampFilter(_msg) = message {
1612-
// When supporting gossip messages, start inital gossip sync only after we receive
1612+
// When supporting gossip messages, start initial gossip sync only after we receive
16131613
// a GossipTimestampFilter
16141614
if peer_lock.their_features.as_ref().unwrap().supports_gossip_queries() &&
16151615
!peer_lock.sent_gossip_timestamp_filter {
@@ -2216,7 +2216,7 @@ impl<Descriptor: SocketDescriptor, CM: Deref, RM: Deref, OM: Deref, L: Deref, CM
22162216
log_pubkey!(node_id));
22172217
}
22182218
// We do not have the peers write lock, so we just store that we're
2219-
// about to disconenct the peer and do it after we finish
2219+
// about to disconnect the peer and do it after we finish
22202220
// processing most messages.
22212221
let msg = msg.map(|msg| wire::Message::<<<CMH as core::ops::Deref>::Target as wire::CustomMessageReader>::CustomMessage>::Error(msg));
22222222
peers_to_disconnect.insert(node_id, msg);
@@ -2225,7 +2225,7 @@ impl<Descriptor: SocketDescriptor, CM: Deref, RM: Deref, OM: Deref, L: Deref, CM
22252225
log_trace!(logger, "Handling DisconnectPeer HandleError event in peer_handler for node {} with message {}",
22262226
log_pubkey!(node_id), msg.data);
22272227
// We do not have the peers write lock, so we just store that we're
2228-
// about to disconenct the peer and do it after we finish
2228+
// about to disconnect the peer and do it after we finish
22292229
// processing most messages.
22302230
peers_to_disconnect.insert(node_id, Some(wire::Message::Warning(msg)));
22312231
},

lightning/src/routing/router.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2706,7 +2706,7 @@ where L::Target: Logger {
27062706
}
27072707
}
27082708

2709-
// Means we succesfully traversed from the payer to the payee, now
2709+
// Means we successfully traversed from the payer to the payee, now
27102710
// save this path for the payment route. Also, update the liquidity
27112711
// remaining on the used hops, so that we take them into account
27122712
// while looking for more paths.
@@ -7803,7 +7803,7 @@ mod tests {
78037803
fn do_min_htlc_overpay_violates_max_htlc(blinded_payee: bool) {
78047804
// Test that if overpaying to meet a later hop's min_htlc and causes us to violate an earlier
78057805
// hop's max_htlc, we don't consider that candidate hop valid. Previously we would add this hop
7806-
// to `targets` and build an invalid path with it, and subsquently hit a debug panic asserting
7806+
// to `targets` and build an invalid path with it, and subsequently hit a debug panic asserting
78077807
// that the used liquidity for a hop was less than its available liquidity limit.
78087808
let secp_ctx = Secp256k1::new();
78097809
let logger = Arc::new(ln_test_utils::TestLogger::new());
@@ -8452,7 +8452,7 @@ pub(crate) mod bench_utils {
84528452
}
84538453
break;
84548454
}
8455-
// If we couldn't find a path with a higer amount, reduce and try again.
8455+
// If we couldn't find a path with a higher amount, reduce and try again.
84568456
score_amt /= 100;
84578457
}
84588458

lightning/src/util/wakers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ mod tests {
491491
}
492492

493493
// Rather annoyingly, there's no safe way in Rust std to construct a Waker despite it being
494-
// totally possible to construct from a trait implementation (though somewhat less effecient
494+
// totally possible to construct from a trait implementation (though somewhat less efficient
495495
// compared to a raw VTable). Instead, we have to write out a lot of boilerplate to build a
496496
// waker, which we do here with a trivial Arc<AtomicBool> data element to track woke-ness.
497497
const WAKER_V_TABLE: RawWakerVTable = RawWakerVTable::new(waker_clone, wake, wake_by_ref, drop);

0 commit comments

Comments
 (0)