Skip to content

Commit 7c4bd03

Browse files
committed
refactor: CTxMemPool::GetTotalTxSize() requires CTxMemPool::cs lock
No change in behavior, the lock is already held at call sites.
1 parent fa5fcb0 commit 7c4bd03

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/txmempool.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -710,9 +710,9 @@ class CTxMemPool
710710
return mapTx.size();
711711
}
712712

713-
uint64_t GetTotalTxSize() const
713+
uint64_t GetTotalTxSize() const EXCLUSIVE_LOCKS_REQUIRED(cs)
714714
{
715-
LOCK(cs);
715+
AssertLockHeld(cs);
716716
return totalTxSize;
717717
}
718718

0 commit comments

Comments
 (0)