Page MenuHomePhabricator

Hold mempool.cs for the duration of ATMP.
ClosedPublic

Authored by deadalnix on Sep 6 2018, 18:42.

Details

Summary

This resolves an issue where getrawmempool() can race mempool
notification signals. Intuitively we use mempool.cs as a "read
lock" on the mempool with cs_main being the write lock, so holding
the read lock intermittently while doing write operations is
somewhat strange.
This also avoids the introduction of cs_main in getrawmempool()
which reviewers objected to in the previous fix in #12273

This backports core PR12368

Test Plan
make check

Diff Detail

Repository
rABC Bitcoin ABC
Branch
corepr12368
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 3219
Build 4525: Bitcoin ABC Buildbot (legacy)
Build 4524: arc lint + arc unit