mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-05-08 13:02:59 +02:00
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>
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user