aboutsummaryrefslogtreecommitdiff
path: root/src/validation.cpp
diff options
context:
space:
mode:
authorJames O'Beirne <james.obeirne@gmail.com>2019-07-24 13:39:42 -0400
committerJames O'Beirne <james.obeirne@gmail.com>2019-08-15 11:19:40 -0400
commit582d2cd74754d6b9a2394616a9c82a89d2d71976 (patch)
tree6aca21d9b8481b465a74811fb9c2b97ddc9576c4 /src/validation.cpp
parent569353068568444a25b301bbd6513bb510157dc9 (diff)
downloadbitcoin-582d2cd74754d6b9a2394616a9c82a89d2d71976.tar.xz
Cover UTXO set access with lock annotations
i.e. any CoinsViews members. Adds a lock acquisition to `gettxoutsetinfo` RPC to comply with added annotations. Co-authored-by: Russell Yanofsky <russ@yanofsky.org>
Diffstat (limited to 'src/validation.cpp')
-rw-r--r--src/validation.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/validation.cpp b/src/validation.cpp
index 0f24321aaf..8f44e2565a 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -314,7 +314,8 @@ bool CheckSequenceLocks(const CTxMemPool& pool, const CTransaction& tx, int flag
// Returns the script flags which should be checked for a given block
static unsigned int GetBlockScriptFlags(const CBlockIndex* pindex, const Consensus::Params& chainparams);
-static void LimitMempoolSize(CTxMemPool& pool, size_t limit, unsigned long age) EXCLUSIVE_LOCKS_REQUIRED(pool.cs)
+static void LimitMempoolSize(CTxMemPool& pool, size_t limit, unsigned long age)
+ EXCLUSIVE_LOCKS_REQUIRED(pool.cs, ::cs_main)
{
int expired = pool.Expire(GetTime() - age);
if (expired != 0) {
@@ -2160,7 +2161,9 @@ static void AppendWarning(std::string& res, const std::string& warn)
}
/** Check warning conditions and do some notifications on new chain tip set. */
-void static UpdateTip(const CBlockIndex *pindexNew, const CChainParams& chainParams) {
+void static UpdateTip(const CBlockIndex* pindexNew, const CChainParams& chainParams)
+ EXCLUSIVE_LOCKS_REQUIRED(::cs_main)
+{
// New best block
mempool.AddTransactionsUpdated(1);