Auto merge of #1600 - str4d:1557-consensus-rule-disallow-v0-txns, r=daira

Disallow v0 transactions as a consensus rule

Closes #1557
This commit is contained in:
zkbot
2016-10-22 13:50:52 -04:00
4 changed files with 26 additions and 2 deletions

View File

@@ -851,6 +851,12 @@ bool CheckTransactionWithoutProofVerification(const CTransaction& tx, CValidatio
{
// Basic checks that don't depend on any context
// Check transaction version
if (tx.nVersion < MIN_TX_VERSION) {
return state.DoS(100, error("CheckTransaction(): version too low"),
REJECT_INVALID, "bad-version-too-low");
}
// Transactions can contain empty `vin` and `vout` so long as
// `vjoinsplit` is non-empty.
if (tx.vin.empty() && tx.vjoinsplit.empty())