Skip to content

Commit

Permalink
Merge branch 'refactor-block-logic'
Browse files Browse the repository at this point in the history
  • Loading branch information
marpme committed Jun 3, 2019
2 parents a8dc1d8 + 954854b commit 3abba95
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/net_processing.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <net.h>
#include <validationinterface.h>
#include <consensus/params.h>
#include <validation.h>

/** Default for -maxorphantx, maximum number of orphan transactions kept in memory */
static const unsigned int DEFAULT_MAX_ORPHAN_TRANSACTIONS = 100;
Expand Down
2 changes: 1 addition & 1 deletion src/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3394,7 +3394,7 @@ static bool ContextualCheckBlock(const CBlock& block, CValidationState& state, c
return state.DoS(100, false, REJECT_INVALID, "bad-blk-weight", false, strprintf("%s : weight limit failed", __func__));
}

if (block.GetBlockTime() <= pindexPrev->GetMedianTimePast() || block.GetBlockTime() + GetMaxClockDrift(nHeight) < pindexPrev->GetBlockTime())
if (nHeight > 0 && (block.GetBlockTime() <= pindexPrev->GetMedianTimePast() || block.GetBlockTime() + GetMaxClockDrift(nHeight) < pindexPrev->GetBlockTime()))
{
state.DoS(100, false, REJECT_INVALID, "bad-blk-time", false, strprintf("%s : blocks timestamp is too early", __func__));
}
Expand Down

0 comments on commit 3abba95

Please sign in to comment.