Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Prevents DoS attack
- diff --git a/src/consensus/tx_verify.cpp b/src/consensus/tx_verify.cpp
- index 439e41f..bf73b95 100755
- --- a/src/consensus/tx_verify.cpp
- +++ b/src/consensus/tx_verify.cpp
- @@ -227,10 +227,9 @@ bool Consensus::CheckTxInputs(const CTransaction& tx, CValidationState& state, c
- // If prev is coinbase, check that it's matured
- if (coin.IsCoinBase()) {
- - if (nSpendHeight - coin.nHeight < COINBASE_MATURITY)
- - return state.Invalid(false,
- - REJECT_INVALID, "bad-txns-premature-spend-of-coinbase",
- - strprintf("tried to spend coinbase at depth %d", nSpendHeight - coin.nHeight));
- + return state.Invalid(false,
- + REJECT_INVALID, "bad-txns-premature-spend-of-coinbase",
- + strprintf("tried to spend coinbase at depth %d", nSpendHeight - coin.nHeight));
- }
- // Check for negative or overflow input values
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement