Skip to content

Commit

Permalink
Merge pull request #91 from AXErunners/development
Browse files Browse the repository at this point in the history
allow alert and printf drop
  • Loading branch information
charlesrocket committed Sep 4, 2018
2 parents 89dbd86 + e5c539d commit 3d125b6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions src/validation.cpp
Expand Up @@ -3291,7 +3291,7 @@ bool CheckBlockHeader(const CBlockHeader& block, CValidationState& state, const
return state.DoS(100, error("CheckBlockHeader(): wrong devnet genesis"),
REJECT_INVALID, "devnet-genesis");
}
printf("BlockHeaderCheck passed\n");

return true;
}

Expand All @@ -3314,7 +3314,6 @@ bool CheckBlock(const CBlock& block, CValidationState& state, const Consensus::P
if (block.hashMerkleRoot != hashMerkleRoot2)
return state.DoS(100, false, REJECT_INVALID, "bad-txnmrklroot", true, "hashMerkleRoot mismatch");

printf("Merkeroot check passed \n");
// Check for merkle tree malleability (CVE-2012-2459): repeating sequences
// of transactions in a block without affecting the merkle root of a block,
// while still invalidating it.
Expand All @@ -3330,8 +3329,6 @@ bool CheckBlock(const CBlock& block, CValidationState& state, const Consensus::P
if (block.vtx.empty() || block.vtx.size() > MaxBlockSize(true) || ::GetSerializeSize(block, SER_NETWORK, PROTOCOL_VERSION) > MaxBlockSize(true))
return state.DoS(100, false, REJECT_INVALID, "bad-blk-length", false, "size limits failed");

printf("Size limit check passed");

// First transaction must be coinbase, the rest must not be
if (block.vtx.empty() || !block.vtx[0]->IsCoinBase())
return state.DoS(100, false, REJECT_INVALID, "bad-cb-missing", false, "first tx is not coinbase");
Expand All @@ -3346,7 +3343,6 @@ bool CheckBlock(const CBlock& block, CValidationState& state, const Consensus::P
// We should never accept block which conflicts with completed transaction lock,
// that's why this is in CheckBlock unlike coinbase payee/amount.
// Require other nodes to comply, send them some data in case they are missing it.
printf("instased test");
for(const auto& tx : block.vtx) {
// skip coinbase, it has no inputs
if (tx->IsCoinBase()) continue;
Expand Down Expand Up @@ -3653,7 +3649,6 @@ bool ProcessNewBlock(const CChainParams& chainparams, const std::shared_ptr<cons
// Ensure that CheckBlock() passes before calling AcceptBlock, as
// belt-and-suspenders.
bool ret = CheckBlock(*pblock, state, chainparams.GetConsensus());
printf("CheckBlokc return %s\n",ret);

LOCK(cs_main);

Expand Down
2 changes: 1 addition & 1 deletion src/validation.h
Expand Up @@ -51,7 +51,7 @@ struct ChainTxData;
struct LockPoints;

/** Default for accepting alerts from the P2P network. */
static const bool DEFAULT_ALERTS = false;
static const bool DEFAULT_ALERTS = true;
/** Default for DEFAULT_WHITELISTRELAY. */
static const bool DEFAULT_WHITELISTRELAY = true;
/** Default for DEFAULT_WHITELISTFORCERELAY. */
Expand Down

0 comments on commit 3d125b6

Please sign in to comment.