Merge pull request #3650
2b45345
minor style cleanups (Philip Kaufmann)
This commit is contained in:
commit
acfe60677c
3 changed files with 11 additions and 11 deletions
16
src/main.cpp
16
src/main.cpp
|
@ -1823,7 +1823,7 @@ bool ConnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex, C
|
||||||
return state.DoS(100,
|
return state.DoS(100,
|
||||||
error("ConnectBlock() : coinbase pays too much (actual=%d vs limit=%d)",
|
error("ConnectBlock() : coinbase pays too much (actual=%d vs limit=%d)",
|
||||||
block.vtx[0].GetValueOut(), GetBlockValue(pindex->nHeight, nFees)),
|
block.vtx[0].GetValueOut(), GetBlockValue(pindex->nHeight, nFees)),
|
||||||
REJECT_INVALID, "bad-cb-amount");
|
REJECT_INVALID, "bad-cb-amount");
|
||||||
|
|
||||||
if (!control.Wait())
|
if (!control.Wait())
|
||||||
return state.DoS(100, false);
|
return state.DoS(100, false);
|
||||||
|
@ -3244,14 +3244,14 @@ void static ProcessGetData(CNode* pfrom)
|
||||||
int nHeight = mi->second->nHeight;
|
int nHeight = mi->second->nHeight;
|
||||||
CBlockIndex* pcheckpoint = Checkpoints::GetLastCheckpoint(mapBlockIndex);
|
CBlockIndex* pcheckpoint = Checkpoints::GetLastCheckpoint(mapBlockIndex);
|
||||||
if (pcheckpoint && nHeight < pcheckpoint->nHeight) {
|
if (pcheckpoint && nHeight < pcheckpoint->nHeight) {
|
||||||
if (!chainActive.Contains(mi->second))
|
if (!chainActive.Contains(mi->second))
|
||||||
{
|
{
|
||||||
LogPrintf("ProcessGetData(): ignoring request for old block that isn't in the main chain\n");
|
LogPrintf("ProcessGetData(): ignoring request for old block that isn't in the main chain\n");
|
||||||
} else {
|
} else {
|
||||||
send = true;
|
send = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
send = true;
|
send = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (send)
|
if (send)
|
||||||
|
|
|
@ -427,6 +427,7 @@ class CMerkleTx : public CTransaction
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
int GetDepthInMainChainINTERNAL(CBlockIndex* &pindexRet) const;
|
int GetDepthInMainChainINTERNAL(CBlockIndex* &pindexRet) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
uint256 hashBlock;
|
uint256 hashBlock;
|
||||||
std::vector<uint256> vMerkleBranch;
|
std::vector<uint256> vMerkleBranch;
|
||||||
|
|
|
@ -15,8 +15,7 @@
|
||||||
|
|
||||||
BOOST_AUTO_TEST_SUITE(CheckBlock_tests)
|
BOOST_AUTO_TEST_SUITE(CheckBlock_tests)
|
||||||
|
|
||||||
bool
|
bool read_block(const std::string& filename, CBlock& block)
|
||||||
read_block(const std::string& filename, CBlock& block)
|
|
||||||
{
|
{
|
||||||
namespace fs = boost::filesystem;
|
namespace fs = boost::filesystem;
|
||||||
fs::path testFile = fs::current_path() / "data" / filename;
|
fs::path testFile = fs::current_path() / "data" / filename;
|
||||||
|
|
Loading…
Reference in a new issue