glozow 7583eac43c
Merge bitcoin/bitcoin#30617: net: Clarify that m_addr_local is only set once
fa6fe432075df5e0eceb1ccd85038159cc820ccc net: Clarify that m_addr_local is only set once (MarcoFalke)

Pull request description:

  The function is supposed to be only called once when the version msg arrives (a single time). Calling it twice would be an internal logic bug. However, the `LogError` in this function has many issues:

  * If the error happens in tests, as is the case for the buggy fuzz test, it will go unnoticed
  * It is dead code, unless a bug is introduced to execute it

  Fix all issues by using `Assume(!m_addr_local.IsValid())` instead. Idea taken from https://github.com/bitcoin/bitcoin/pull/30364#discussion_r1680530382

ACKs for top commit:
  achow101:
    ACK fa6fe432075df5e0eceb1ccd85038159cc820ccc
  mzumsande:
    utACK fa6fe432075df5e0eceb1ccd85038159cc820ccc
  glozow:
    ACK fa6fe432075df5e0eceb1ccd85038159cc820ccc

Tree-SHA512: 8c1e8c524768f4f36cc50110ae54ee423e057a963ff78f736f3bf92df1ce5af28e3e0149153780897944e1d5c22ddbca9dac9865d9f4d44afffa152bc8559405
2024-08-13 10:19:19 +01:00
..
2024-08-06 01:38:10 +02:00
2024-07-24 15:57:01 +01:00
2024-07-08 11:12:01 +02:00
2024-07-08 11:12:01 +02:00
2023-10-12 11:27:19 +02:00
2024-04-10 17:01:27 +02:00
2024-08-06 01:38:10 +02:00
2024-08-06 01:38:10 +02:00
2024-06-13 11:20:49 +01:00
2024-08-06 01:38:10 +02:00
2024-08-06 01:38:10 +02:00
2023-11-16 11:36:22 +10:00
2024-07-24 15:57:01 +01:00
2024-08-04 08:51:36 +02:00
2023-09-13 11:37:45 +01:00
2024-05-20 16:48:19 +00:00
2024-07-08 11:12:01 +02:00
2024-07-08 11:12:01 +02:00
2024-05-14 10:24:31 +02:00
2024-05-14 10:24:31 +02:00
2024-07-08 11:12:01 +02:00
2024-04-01 14:37:24 -04:00
2024-07-08 11:12:01 +02:00
2024-07-08 11:12:01 +02:00
2023-11-16 11:36:22 +10:00