Alerts may be sent to peers before version negotiation is complete #1436

issue mikehearn opened this issue on June 9, 2012
  1. mikehearn commented at 9:49 PM on June 9, 2012: contributor

    This isn't a big deal except that it breaks an assumption in bitcoinj occasionally, but if an alert is received from a peer it will be relayed to new peers that didn't see it yet even if there has been no version negotiation. IMHO ver/verack should be the first traffic on a newly created connection and other traffic should be delayed until after it completes. Probably the fix is as simple as ignoring peers that have no version set in the "alert" handling code.

  2. laanwj commented at 8:56 AM on February 24, 2014: member

    bitcoind itself will also set Misbehaving for peers that send anything before the version message, including alerts.

  3. laanwj referenced this in commit 131e24fa8d on Oct 29, 2014
  4. laanwj referenced this in commit 20a5f610d3 on Oct 29, 2014
  5. laanwj closed this on Nov 3, 2014

  6. lateminer referenced this in commit 98e6867e0c on May 6, 2020
  7. reddink referenced this in commit c00c0954fa on May 27, 2020
  8. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 18:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me