Skip to content

Conversation

maflcko
Copy link
Member

@maflcko maflcko commented Sep 20, 2021

There is no need to log AlreadyHaveTx for an inv when a peer is marked for disconnection due to sending that inv. In fact, I find it confusing that a block-relay-only connection calls AlreadyHaveTx at all. Also there is no need to call AddKnownTx when the peer is marked for disconnection.

Can be reviewed with --color-moved=dimmed-zebra
@maflcko maflcko changed the title net: Avoid logging AlreadyHaveTx when disconneting misbehaving peer net: Avoid logging AlreadyHaveTx when disconnecting misbehaving peer Sep 20, 2021
@maflcko maflcko force-pushed the 2109-netLogDisconnect branch from fadc844 to fa2662c Compare September 20, 2021 07:25
@fanquake fanquake added the P2P label Sep 20, 2021
@naumenkogs
Copy link
Member

ACK fa2662c

@jnewbery
Copy link
Contributor

Code review ACK fa2662c

@DrahtBot
Copy link
Contributor

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #22778 (net processing: Reduce resource usage for inbound block-relay-only connections by jnewbery)
  • #21160 (net/net processing: Move tx inventory into net_processing by jnewbery)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@dunxen
Copy link
Contributor

dunxen commented Oct 5, 2021

Concept and code review ACK fa2662c

Makes sense to return earlier in this scenario. This took me on a nice little journey in P2P things getting some better context.

@fanquake fanquake merged commit 788909f into bitcoin:master Oct 22, 2021
@maflcko maflcko deleted the 2109-netLogDisconnect branch October 22, 2021 11:33
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Oct 22, 2021
…ing misbehaving peer

fa2662c net: Avoid logging AlreadyHaveTx when disconnecting misbehaving peer (MarcoFalke)

Pull request description:

  There is no need to log `AlreadyHaveTx` for an inv when a peer is marked for disconnection due to sending that inv. In fact, I find it confusing that a `block-relay-only` connection calls `AlreadyHaveTx` at all. Also there is no need to call `AddKnownTx` when the peer is marked for disconnection.

ACKs for top commit:
  naumenkogs:
    ACK fa2662c
  jnewbery:
    Code review ACK fa2662c
  dunxen:
    Concept and code review ACK fa2662c

Tree-SHA512: 9996b807a824021f992b5281d82ff0cbbe6a442c2fedf7dfd6adda64ccc5e0ef4fb0ff91ab75086f975837bbbb7a5934ac7e671a80dcababa7203c92fc0c7f84
@bitcoin bitcoin locked and limited conversation to collaborators Oct 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants