Changeset View
Changeset View
Standalone View
Standalone View
src/test/miner_tests.cpp
// Copyright (c) 2011-2016 The Bitcoin Core developers | // Copyright (c) 2011-2016 The Bitcoin Core developers | ||||
Lint: Code style violation: '/Users/shammah/repos/bitcoin-abc/src/test/miner_tests.cpp' has code style errors. | |||||
// 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 "chainparams.h" | #include "chainparams.h" | ||||
#include "coins.h" | #include "coins.h" | ||||
#include "config.h" | #include "config.h" | ||||
#include "consensus/consensus.h" | #include "consensus/consensus.h" | ||||
▲ Show 20 Lines • Show All 285 Lines • ▼ Show 20 Lines | for (unsigned int i = 0; i < sizeof(blockinfo) / sizeof(*blockinfo); ++i) { | ||||
pblock->hashPrevBlock = pblock->GetHash(); | pblock->hashPrevBlock = pblock->GetHash(); | ||||
} | } | ||||
// Just to make sure we can still make simple blocks. | // Just to make sure we can still make simple blocks. | ||||
BOOST_CHECK( | BOOST_CHECK( | ||||
pblocktemplate = | pblocktemplate = | ||||
BlockAssembler(config, chainparams).CreateNewBlock(scriptPubKey)); | BlockAssembler(config, chainparams).CreateNewBlock(scriptPubKey)); | ||||
const CAmount BLOCKSUBSIDY = 50 * COIN; | const CAmount BLOCKSUBSIDY = 50 * COIN.GetSatoshis(); | ||||
const CAmount LOWFEE = CENT; | const CAmount LOWFEE = CENT.GetSatoshis(); | ||||
const CAmount HIGHFEE = COIN; | const CAmount HIGHFEE = COIN.GetSatoshis(); | ||||
const CAmount HIGHERFEE = 4 * COIN; | const CAmount HIGHERFEE = 4 * COIN.GetSatoshis(); | ||||
// block sigops > limit: 1000 CHECKMULTISIG + 1 | // block sigops > limit: 1000 CHECKMULTISIG + 1 | ||||
tx.vin.resize(1); | tx.vin.resize(1); | ||||
// NOTE: OP_NOP is used to force 20 SigOps for the CHECKMULTISIG | // NOTE: OP_NOP is used to force 20 SigOps for the CHECKMULTISIG | ||||
tx.vin[0].scriptSig = CScript() << OP_0 << OP_0 << OP_0 << OP_NOP | tx.vin[0].scriptSig = CScript() << OP_0 << OP_0 << OP_0 << OP_NOP | ||||
<< OP_CHECKMULTISIG << OP_1; | << OP_CHECKMULTISIG << OP_1; | ||||
tx.vin[0].prevout.hash = txFirst[0]->GetId(); | tx.vin[0].prevout.hash = txFirst[0]->GetId(); | ||||
tx.vin[0].prevout.n = 0; | tx.vin[0].prevout.n = 0; | ||||
▲ Show 20 Lines • Show All 468 Lines • Show Last 20 Lines |
'/Users/shammah/repos/bitcoin-abc/src/test/miner_tests.cpp' has code style errors.