Bitcoin ABC  0.29.2
P2P Digital Currency
versionbits.cpp
Go to the documentation of this file.
1 // Copyright (c) 2016-2018 The Bitcoin Core 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 #include <consensus/params.h>
6 #include <versionbits.h>
7 
8 int32_t ComputeBlockVersion(const CBlockIndex *pindexPrev,
9  const Consensus::Params &params) {
10  // Clear the last 4 bits (miner fund activation).
11  return VERSIONBITS_TOP_BITS & ~uint32_t(0x0f);
12 }
The block chain is a tree shaped structure starting with the genesis block at the root,...
Definition: blockindex.h:26
Parameters that influence chain consensus.
Definition: params.h:34
int32_t ComputeBlockVersion(const CBlockIndex *pindexPrev, const Consensus::Params &params)
Determine what nVersion a new block should use.
Definition: versionbits.cpp:8
static const int32_t VERSIONBITS_TOP_BITS
What bits to set in version for versionbits blocks.
Definition: versionbits.h:14