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 cross-referenced this on Oct 29, 2014 from issue Don't relay alerts to peers before version negotiation by laanwj
  6. laanwj closed this on Nov 3, 2014

  7. fsb4000 cross-referenced this on Nov 16, 2014 from issue improve "about Novacoin" + one fix from bitcoin by fsb4000
  8. lateminer referenced this in commit 98e6867e0c on May 6, 2020
  9. reddink referenced this in commit c00c0954fa on May 27, 2020
  10. bitcoin 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-05-20 06:56 UTC