MacroFake 50a3921c96
Merge bitcoin/bitcoin#25144: refactor: Pass Peer& to Misbehaving()
fa8aa0aa8180c3a0369c7589b8747666778a0deb Pass Peer& to Misbehaving() (MacroFake)

Pull request description:

  `Misbehaving` has several coding related issues (ignoring the conceptual issues here for now):
  * It is public, but it is not supposed to be called from outside of net_processing. Fix that by making it private and creating a public `UnitTestMisbehaving` method for unit testing only.
  * It doesn't do anything if a `nullptr` is passed. It would be less confusing to just skip the call instead. Fix that by passing `Peer&` to `Misbehaving()`.
  * It calls `GetPeerRef`, causing `!m_peer_mutex` lock annotations to be propagated. This is harmless, but verbose. Fix it by removing the no longer needed call to `GetPeerRef` and the no longer needed lock annotations.

ACKs for top commit:
  vasild:
    ACK fa8aa0aa8180c3a0369c7589b8747666778a0deb
  w0xlt:
    Code Review ACK fa8aa0aa81

Tree-SHA512: e60a6b317f2b826f9e0724285d00b632d3e2a91ded9fa5ba01c80766c5d39270b719be234c01302d46eaba600910032693836aa116ff05ee1b590c7530881cd3
2022-06-27 11:21:08 +02:00
..
2021-09-29 14:10:29 +02:00
2022-06-10 12:39:08 +01:00
2022-06-08 10:03:43 -03:00
2022-06-20 12:22:05 +01:00
2021-11-12 11:46:34 +01:00
2022-04-20 14:29:29 +01:00
2022-06-08 13:35:32 +02:00
2022-02-15 09:29:53 -05:00
2022-06-20 12:22:05 +01:00
2022-06-20 12:22:05 +01:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2022-05-27 16:59:45 +02:00
2022-05-30 13:55:39 +02:00
2022-01-02 11:40:31 +01:00
2022-06-21 22:54:55 +07:00
2021-12-30 19:36:57 +02:00
2021-12-30 19:36:57 +02:00
2022-03-10 13:05:29 +01:00
2022-01-02 11:40:31 +01:00