Skip to content

Commit 2e15fa1

Browse files
committed
Merge #12842: Prevent concurrent savemempool
585b47c rpc: Prevent concurrent savemempool (João Barbosa) Pull request description: Follow up of #12172, this change prevents calling `savemempool` RPC concurrently. Tree-SHA512: 4759a7107658a9794f5c6ab7e3e3002276abadd64996010be67a2791914d284db6fe0377c071a8d6a42387bfb0178f219b73aeec077ce5c4fe5c634a30b3e081
2 parents 9dda5fd + 585b47c commit 2e15fa1

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)