Changeset View
Changeset View
Standalone View
Standalone View
src/miner.cpp
// Copyright (c) 2009-2010 Satoshi Nakamoto | // Copyright (c) 2009-2010 Satoshi Nakamoto | ||||
Lint: Code style violation: '/Users/shammah/repos/bitcoin-abc/src/miner.cpp' has code style errors. | |||||
// Copyright (c) 2009-2016 The Bitcoin Core developers | // Copyright (c) 2009-2016 The Bitcoin Core 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 "miner.h" | #include "miner.h" | ||||
#include "amount.h" | #include "amount.h" | ||||
#include "chain.h" | #include "chain.h" | ||||
▲ Show 20 Lines • Show All 185 Lines • ▼ Show 20 Lines | BlockAssembler::CreateNewBlock(const CScript &scriptPubKeyIn) { | ||||
coinbaseTx.vin.resize(1); | coinbaseTx.vin.resize(1); | ||||
coinbaseTx.vin[0].prevout.SetNull(); | coinbaseTx.vin[0].prevout.SetNull(); | ||||
coinbaseTx.vout.resize(1); | coinbaseTx.vout.resize(1); | ||||
coinbaseTx.vout[0].scriptPubKey = scriptPubKeyIn; | coinbaseTx.vout[0].scriptPubKey = scriptPubKeyIn; | ||||
coinbaseTx.vout[0].nValue = | coinbaseTx.vout[0].nValue = | ||||
nFees + GetBlockSubsidy(nHeight, chainparams.GetConsensus()); | nFees + GetBlockSubsidy(nHeight, chainparams.GetConsensus()); | ||||
coinbaseTx.vin[0].scriptSig = CScript() << nHeight << OP_0; | coinbaseTx.vin[0].scriptSig = CScript() << nHeight << OP_0; | ||||
pblock->vtx[0] = MakeTransactionRef(coinbaseTx); | pblock->vtx[0] = MakeTransactionRef(coinbaseTx); | ||||
pblocktemplate->vTxFees[0] = -nFees; | pblocktemplate->vTxFees[0] = -1 * nFees; | ||||
uint64_t nSerializeSize = | uint64_t nSerializeSize = | ||||
GetSerializeSize(*pblock, SER_NETWORK, PROTOCOL_VERSION); | GetSerializeSize(*pblock, SER_NETWORK, PROTOCOL_VERSION); | ||||
LogPrintf("CreateNewBlock(): total size: %u txs: %u fees: %ld sigops %d\n", | LogPrintf("CreateNewBlock(): total size: %u txs: %u fees: %ld sigops %d\n", | ||||
nSerializeSize, nBlockTx, nFees, nBlockSigOps); | nSerializeSize, nBlockTx, nFees, nBlockSigOps); | ||||
// Fill in header. | // Fill in header. | ||||
▲ Show 20 Lines • Show All 452 Lines • Show Last 20 Lines |
'/Users/shammah/repos/bitcoin-abc/src/miner.cpp' has code style errors.