aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpracticalswift <practicalswift@users.noreply.github.com>2017-10-31 10:25:09 +0100
committerpracticalswift <practicalswift@users.noreply.github.com>2017-10-31 10:34:00 +0100
commit3ab545d7f8e979e2cabeff6f5f6f1afe94a5c195 (patch)
tree31cbea26e16e5ef09714f6ce8230b7471c71956d /src
parentbb9ab0fccfbadd5c032a2cd0bb3135049cffa42b (diff)
addrman: Add missing lock in Clear() (CAddrMan)
The variable vRandom is guarded by the mutex cs.
Diffstat (limited to 'src')
-rw-r--r--src/addrman.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/addrman.h b/src/addrman.h
index 18f3062287..f347cba6ca 100644
--- a/src/addrman.h
+++ b/src/addrman.h
@@ -455,6 +455,7 @@ public:
void Clear()
{
+ LOCK(cs);
std::vector<int>().swap(vRandom);
nKey = GetRandHash();
for (size_t bucket = 0; bucket < ADDRMAN_NEW_BUCKET_COUNT; bucket++) {