Changeset View
Changeset View
Standalone View
Standalone View
src/validation.cpp
// Copyright (c) 2009-2010 Satoshi Nakamoto | // Copyright (c) 2009-2010 Satoshi Nakamoto | ||||
Lint: Code style violation: '/Users/shammah/repos/bitcoin-abc/src/validation.cpp' has code style errors. | |||||
// Copyright (c) 2009-2016 The Bitcoin Core developers | // Copyright (c) 2009-2016 The Bitcoin Core developers | ||||
// Copyright (c) 2017 The Bitcoin developers | // Copyright (c) 2017 The Bitcoin developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#include "validation.h" | #include "validation.h" | ||||
#include "arith_uint256.h" | #include "arith_uint256.h" | ||||
▲ Show 20 Lines • Show All 1,071 Lines • ▼ Show 20 Lines | bool ReadBlockFromDisk(CBlock &block, const CBlockIndex *pindex, | ||||
return true; | return true; | ||||
} | } | ||||
CAmount GetBlockSubsidy(int nHeight, const Consensus::Params &consensusParams) { | CAmount GetBlockSubsidy(int nHeight, const Consensus::Params &consensusParams) { | ||||
int halvings = nHeight / consensusParams.nSubsidyHalvingInterval; | int halvings = nHeight / consensusParams.nSubsidyHalvingInterval; | ||||
// Force block reward to zero when right shift is undefined. | // Force block reward to zero when right shift is undefined. | ||||
if (halvings >= 64) return 0; | if (halvings >= 64) return 0; | ||||
CAmount nSubsidy = 50 * COIN; | CAmount nSubsidy = 50 * COIN.GetSatoshis(); | ||||
// Subsidy is cut in half every 210,000 blocks which will occur | // Subsidy is cut in half every 210,000 blocks which will occur | ||||
// approximately every 4 years. | // approximately every 4 years. | ||||
nSubsidy >>= halvings; | nSubsidy >>= halvings; | ||||
return nSubsidy; | return nSubsidy; | ||||
} | } | ||||
bool IsInitialBlockDownload() { | bool IsInitialBlockDownload() { | ||||
const CChainParams &chainParams = Params(); | const CChainParams &chainParams = Params(); | ||||
▲ Show 20 Lines • Show All 3,843 Lines • Show Last 20 Lines |
'/Users/shammah/repos/bitcoin-abc/src/validation.cpp' has code style errors.