aboutsummaryrefslogtreecommitdiff
path: root/src/validation.cpp
diff options
context:
space:
mode:
authorJoão Barbosa <joao.paulo.barbosa@gmail.com>2018-03-30 17:48:20 +0100
committerJoão Barbosa <joao.paulo.barbosa@gmail.com>2018-10-20 11:12:20 +0100
commit585b47cfe133fae112782ad0a88fe25c71d465fa (patch)
tree5ca29c50646216a55e54572da9e2e844b6f435a1 /src/validation.cpp
parent6746a8951923513590dd241912cb67100f6e0aac (diff)
rpc: Prevent concurrent savemempool
Diffstat (limited to 'src/validation.cpp')
-rw-r--r--src/validation.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/validation.cpp b/src/validation.cpp
index 458458d85d..9d7d1f1dc1 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -4766,6 +4766,9 @@ bool DumpMempool()
std::map<uint256, CAmount> mapDeltas;
std::vector<TxMempoolInfo> vinfo;
+ static Mutex dump_mutex;
+ LOCK(dump_mutex);
+
{
LOCK(mempool.cs);
for (const auto &i : mempool.mapDeltas) {