Advertisement
Guest User

Untitled

a guest
Sep 21st, 2018
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. Prevents DoS attack
  2. diff --git a/src/consensus/tx_verify.cpp b/src/consensus/tx_verify.cpp
  3. index 439e41f..bf73b95 100755
  4. --- a/src/consensus/tx_verify.cpp
  5. +++ b/src/consensus/tx_verify.cpp
  6. @@ -227,10 +227,9 @@ bool Consensus::CheckTxInputs(const CTransaction& tx, CValidationState& state, c
  7.  
  8. // If prev is coinbase, check that it's matured
  9. if (coin.IsCoinBase()) {
  10. - if (nSpendHeight - coin.nHeight < COINBASE_MATURITY)
  11. - return state.Invalid(false,
  12. - REJECT_INVALID, "bad-txns-premature-spend-of-coinbase",
  13. - strprintf("tried to spend coinbase at depth %d", nSpendHeight - coin.nHeight));
  14. + return state.Invalid(false,
  15. + REJECT_INVALID, "bad-txns-premature-spend-of-coinbase",
  16. + strprintf("tried to spend coinbase at depth %d", nSpendHeight - coin.nHeight));
  17. }
  18.  
  19. // Check for negative or overflow input values
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement