Treat non-version-1 transactions as non-standard

Adds CBlock::CURRENT_VERSION and CTransaction::CURRENT_VERSION
constants, and makes non-CURRENT_VERSION transactions nonstandard.
This will help make future upgrades smoother.
This commit is contained in:
Gavin Andresen
2012-06-27 12:43:19 -04:00
parent 6e3a1a3742
commit dae3e10a5a
2 changed files with 7 additions and 2 deletions

View File

@@ -268,6 +268,9 @@ bool CTransaction::ReadFromDisk(COutPoint prevout)
bool CTransaction::IsStandard() const
{
if (nVersion > CTransaction::CURRENT_VERSION)
return false;
BOOST_FOREACH(const CTxIn& txin, vin)
{
// Biggest 'standard' txin is a 3-signature 3-of-3 CHECKMULTISIG