mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-19 13:27:35 +02:00
p2p: add assertions and negative TS annotations for m_addr_local_mutex
This commit is contained in:
parent
c4a31ca267
commit
93609c1dfa
2 changed files with 4 additions and 2 deletions
|
|
@ -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());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue