Skip to content

Commit 585b47c

Browse files
committed
rpc: Prevent concurrent savemempool
1 parent 6746a89 commit 585b47c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/validation.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4766,6 +4766,9 @@ bool DumpMempool()
47664766
std::map<uint256, CAmount> mapDeltas;
47674767
std::vector<TxMempoolInfo> vinfo;
47684768

4769+
static Mutex dump_mutex;
4770+
LOCK(dump_mutex);
4771+
47694772
{
47704773
LOCK(mempool.cs);
47714774
for (const auto &i : mempool.mapDeltas) {

0 commit comments

Comments
 (0)