Disallow v0 transactions as a consensus rule

Closes #1557
This commit is contained in:
Jack Grigg
2016-10-21 23:07:50 -05:00
parent a12eaa2bf2
commit 7ac924cdb7
3 changed files with 18 additions and 0 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())