diff options
author | w0xlt <94266259+w0xlt@users.noreply.github.com> | 2022-01-20 17:28:37 -0300 |
---|---|---|
committer | w0xlt <94266259+w0xlt@users.noreply.github.com> | 2022-01-20 17:34:48 -0300 |
commit | 93609c1dfad70961697d0d12bf01cd34b8ceb6c8 (patch) | |
tree | b40da82b94689ad5089af8ddf365fd7347716596 /src/net.cpp | |
parent | c4a31ca267f74bff76a43878177d05d22825a203 (diff) |
p2p: add assertions and negative TS annotations for m_addr_local_mutex
Diffstat (limited to 'src/net.cpp')
-rw-r--r-- | src/net.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/net.cpp b/src/net.cpp index 88ccc8817c..0e243f4224 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -553,11 +553,13 @@ std::string ConnectionTypeAsString(ConnectionType conn_type) CService CNode::GetAddrLocal() const { + AssertLockNotHeld(m_addr_local_mutex); LOCK(m_addr_local_mutex); return addrLocal; } void CNode::SetAddrLocal(const CService& addrLocalIn) { + AssertLockNotHeld(m_addr_local_mutex); LOCK(m_addr_local_mutex); if (addrLocal.IsValid()) { error("Addr local already set for node: %i. Refusing to change from %s to %s", id, addrLocal.ToString(), addrLocalIn.ToString()); |