Skip to content

Commit

Permalink
flying delorean transaction exploit fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hclivess committed Dec 9, 2015
1 parent d671b09 commit c5fdce5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main.cpp
Expand Up @@ -644,6 +644,9 @@ bool CTransaction::CheckTransaction() const
return DoS(10, error("CTransaction::CheckTransaction() : vin empty"));
if (vout.empty())
return DoS(10, error("CTransaction::CheckTransaction() : vout empty"));
// Time (prevent mempool memory exhaustion attack)
if (nTime > GetAdjustedTime() + nMaxClockDrift)
return DoS(10, error("CTransaction::CheckTransaction() : timestamp is too far into the future"));
// Size limits
if (::GetSerializeSize(*this, SER_NETWORK, PROTOCOL_VERSION) > MAX_BLOCK_SIZE)
return DoS(100, error("CTransaction::CheckTransaction() : size limits failed"));
Expand Down

1 comment on commit c5fdce5

@hclivess
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did I directly change the source code without a pull request? If so, can someone review?

Please sign in to comment.