diff options
author | MacroFake <falke.marco@gmail.com> | 2022-05-16 16:45:53 +0200 |
---|---|---|
committer | MacroFake <falke.marco@gmail.com> | 2022-05-27 16:59:45 +0200 |
commit | fa8aa0aa8180c3a0369c7589b8747666778a0deb (patch) | |
tree | fbcf67e1dc84ff00236a5a0faee5511d02be8e32 /.editorconfig | |
parent | 3ba6dd6f4bb42bfab48194ce5f44850b0109451a (diff) |
Pass Peer& to Misbehaving()
`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.
Diffstat (limited to '.editorconfig')
0 files changed, 0 insertions, 0 deletions