rpc: Prevent concurrent savemempool

This commit is contained in:
João Barbosa 2018-03-30 17:48:20 +01:00
parent 6746a89519
commit 585b47cfe1

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) {