Skip to content

Commit b375d71

Browse files
committed
Updated docs on PeerManager::process_events.
Try to make it a bit more clear that there are downsides to solely relying on `lightning-net-tokio`, and it's still recommended to occasionally call this function in a separate loop.
1 parent 76a93a3 commit b375d71

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lightning/src/ln/peer_handler.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2057,8 +2057,12 @@ impl<Descriptor: SocketDescriptor, CM: Deref, RM: Deref, OM: Deref, L: Deref, CM
20572057
/// May call [`send_data`] on [`SocketDescriptor`]s. Thus, be very careful with reentrancy
20582058
/// issues!
20592059
///
2060-
/// You don't have to call this function explicitly if you are using [`lightning-net-tokio`]
2061-
/// or one of the other clients provided in our language bindings.
2060+
/// You're not required to call this function explicitly if you are using [`lightning-net-tokio`]
2061+
/// or one of the other clients provided in our language bindings, as it will be called
2062+
/// automatically when a message is received from a peer. However, it can in some cases delay
2063+
/// messages from going out if peers are not sending messages, so it is still recommended to
2064+
/// call it when messages may need to be sent, e.g. after processing channel events that may
2065+
/// have resulted in an update to the channel state.
20622066
///
20632067
/// Note that if there are any other calls to this function waiting on lock(s) this may return
20642068
/// without doing any work. All available events that need handling will be handled before the

0 commit comments

Comments
 (0)