From 7c4bd0387a01a0c3e2938d530dba3c882e4d8f2b Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Tue, 1 Sep 2020 12:33:39 +0300 Subject: refactor: CTxMemPool::GetTotalTxSize() requires CTxMemPool::cs lock No change in behavior, the lock is already held at call sites. --- src/txmempool.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/txmempool.h b/src/txmempool.h index ddd87d2eb3..6e286faf80 100644 --- a/src/txmempool.h +++ b/src/txmempool.h @@ -710,9 +710,9 @@ public: return mapTx.size(); } - uint64_t GetTotalTxSize() const + uint64_t GetTotalTxSize() const EXCLUSIVE_LOCKS_REQUIRED(cs) { - LOCK(cs); + AssertLockHeld(cs); return totalTxSize; } -- cgit v1.2.3