rpc: Prevent concurrent savemempool

This commit is contained in:
João Barbosa committed 2018-10-20 11:12:20 +01:00
1 parent 6746a89519
commit 585b47cfe1
1 file changed
+3
+3
View File
@@ -4766,6 +4766,9 @@ bool DumpMempool()
std::map<uint256, CAmount> mapDeltas; std::map<uint256, CAmount> mapDeltas;
std::vector<TxMempoolInfo> vinfo; std::vector<TxMempoolInfo> vinfo;
static Mutex dump_mutex;
LOCK(dump_mutex);
{ {
LOCK(mempool.cs); LOCK(mempool.cs);
for (const auto &i : mempool.mapDeltas) { for (const auto &i : mempool.mapDeltas) {