aboutsummaryrefslogtreecommitdiff
path: root/src/test/addrman_tests.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/addrman_tests.cpp')
-rw-r--r--src/test/addrman_tests.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/test/addrman_tests.cpp b/src/test/addrman_tests.cpp
index 1103292c1a..79c7102c4f 100644
--- a/src/test/addrman_tests.cpp
+++ b/src/test/addrman_tests.cpp
@@ -34,6 +34,7 @@ public:
//! Ensure that bucket placement is always the same for testing purposes.
void MakeDeterministic()
{
+ LOCK(cs);
nKey.SetNull();
insecure_rand = FastRandomContext(true);
}
@@ -76,7 +77,7 @@ public:
{
int64_t nLastSuccess = 1;
// Set last good connection in the deep past.
- Good(addr, true, nLastSuccess);
+ Good(addr, nLastSuccess);
bool count_failure = false;
int64_t nLastTry = GetAdjustedTime()-61;
@@ -87,11 +88,11 @@ public:
{
CAddrMan::Clear();
if (deterministic) {
+ LOCK(cs);
nKey.SetNull();
insecure_rand = FastRandomContext(true);
}
}
-
};
static CNetAddr ResolveIP(const std::string& ip)