Skip to content
This repository has been archived by the owner on Dec 19, 2020. It is now read-only.

Commit

Permalink
addrman: Add missing lock in Clear() (CAddrMan)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheComputerGenie committed Oct 30, 2020
1 parent 15b4e3a commit f7daa0b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/addrman.h
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,7 @@ friend class CAddrManTest;

void Clear()
{
LOCK(cs);
std::vector<int>().swap(vRandom);
nKey = GetRandHash();
for (size_t bucket = 0; bucket < ADDRMAN_NEW_BUCKET_COUNT; bucket++) {
Expand Down

0 comments on commit f7daa0b

Please sign in to comment.