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-07-22 13:59:42 +02:00
2023-11-14 17:41:54 +01:00
2023-12-06 15:44:38 +01:00
2024-01-09 15:15:36 -03:00
2024-03-18 10:32:00 -04:00
2023-11-30 11:28:19 +01:00
2024-06-12 15:21:31 +02:00
2023-11-07 10:21:51 +09:00
2024-07-31 16:47:38 +01:00
2023-11-30 11:28:19 +01:00
2024-07-08 16:11:15 +02:00
2023-11-30 11:28:19 +01:00
2023-11-30 11:28:19 +01:00
2023-11-30 11:28:19 +01:00