Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lightning/src/ln/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6024,13 +6024,13 @@ where
2*(1 + 71); // two signatures + sighash type flags
if let Some(spk) = a_scriptpubkey {
ret += ((8+1) + // output values and script length
spk.len() as u64)
* 4; // scriptpubkey and witness multiplier
spk.len() as u64) // scriptpubkey
* 4; // witness multiplier
}
if let Some(spk) = b_scriptpubkey {
ret += ((8+1) + // output values and script length
spk.len() as u64)
* 4; // scriptpubkey and witness multiplier
spk.len() as u64) // scriptpubkey
* 4; // witness multiplier
}
ret
}
Expand Down
8 changes: 5 additions & 3 deletions lightning/src/ln/msgs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1933,9 +1933,11 @@ pub trait BaseMessageHandler {

/// Handle a peer (re)connecting.
///
/// May return an `Err(())` if the features the peer supports are not sufficient to communicate
/// with us. Implementors should be somewhat conservative about doing so, however, as other
/// message handlers may still wish to communicate with this peer.
/// May return an `Err(())` to indicate that we should immediately disconnect from the peer
/// (e.g. because the features they support are not sufficient to communicate with us).
///
/// Note, of course, that other message handlers may wish to communicate with the peer, which
/// disconnecting them will prevent.
///
/// [`Self::peer_disconnected`] will not be called if `Err(())` is returned.
fn peer_connected(&self, their_node_id: PublicKey, msg: &Init, inbound: bool)
Expand Down
Loading
Loading