Bitcoin ABC 0.26.3
P2P Digital Currency
Loading...
Searching...
No Matches
preconsensus.h
Go to the documentation of this file.
1// Copyright (c) 2024 The Bitcoin developers
2// Distributed under the MIT software license, see the accompanying
3// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5#ifndef BITCOIN_POLICY_BLOCK_PRECONSENSUS_H
6#define BITCOIN_POLICY_BLOCK_PRECONSENSUS_H
7
8#include <consensus/amount.h>
10#include <primitives/block.h>
11#include <txmempool.h>
12
13class CBlockIndex;
14
16private:
20
21public:
23 const CTxMemPool *mempool)
24 : m_block(block), m_blockIndex(blockIndex), m_mempool(mempool) {}
25
26 bool operator()(BlockPolicyValidationState &state) override
28};
29
30#endif // BITCOIN_POLICY_BLOCK_PRECONSENSUS_H
Definition block.h:60
The block chain is a tree shaped structure starting with the genesis block at the root,...
Definition blockindex.h:25
CTxMemPool stores valid-according-to-the-current-best-chain transactions that may be included in the ...
Definition txmempool.h:212
RecursiveMutex cs
This mutex needs to be locked when accessing mapTx or other members that are guarded by it.
Definition txmempool.h:307
const CBlockIndex & m_blockIndex
const CTxMemPool * m_mempool
const CBlock & m_block
bool operator()(BlockPolicyValidationState &state) override EXCLUSIVE_LOCKS_REQUIRED(m_mempool -> cs)
PreConsensusPolicy(const CBlockIndex &blockIndex, const CBlock &block, const CTxMemPool *mempool)
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...
Definition random.h:85
#define EXCLUSIVE_LOCKS_REQUIRED(...)