chore: expand a bitswap comment

Co-authored-by: Joonas Koivunen <joonas.koivunen@gmail.com>
This commit is contained in:
ljedrz 2020-07-31 16:35:42 +02:00 committed by GitHub
parent c0524d5791
commit 0e45c71c7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -237,6 +237,8 @@ impl NetworkBehaviour for Bitswap {
fn inject_event(&mut self, source: PeerId, _connection: ConnectionId, message: MessageWrapper) {
let mut message = match message {
// we just sent an outgoing bitswap message, nothing to do here
// FIXME: we could commit any pending stats accounting for this peer now
// that the message may have sent, if we'd do such accounting
MessageWrapper::Tx => return,
// we've received a bitswap message, process it
MessageWrapper::Rx(msg) => msg,