mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 04:22:55 +01:00
merge bitcoin#15474: Make mempoolinfo atomic
This commit is contained in:
parent
f9d5542daa
commit
7ae2e66612
@ -1680,6 +1680,8 @@ static UniValue getchaintips(const JSONRPCRequest& request)
|
|||||||
|
|
||||||
UniValue MempoolInfoToJSON(const CTxMemPool& pool)
|
UniValue MempoolInfoToJSON(const CTxMemPool& pool)
|
||||||
{
|
{
|
||||||
|
// Make sure this call is atomic in the pool.
|
||||||
|
LOCK(pool.cs);
|
||||||
UniValue ret(UniValue::VOBJ);
|
UniValue ret(UniValue::VOBJ);
|
||||||
ret.pushKV("size", (int64_t)pool.size());
|
ret.pushKV("size", (int64_t)pool.size());
|
||||||
ret.pushKV("bytes", (int64_t)pool.GetTotalTxSize());
|
ret.pushKV("bytes", (int64_t)pool.GetTotalTxSize());
|
||||||
|
Loading…
Reference in New Issue
Block a user