message: Update transaction check
diff: #include "consensus.h"
  #include "primitives/transaction.h"
  #include "script/interpreter.h"
  +#include "script/standard.h"
  #include "validation.h"
  // TODO remove the following dependencies
  @@ -164,13 +165,16 @@ bool CheckTransaction(const CTransaction& tx, CValidationState &state, bool fChe
  if (tx.vout.empty())
  return state.DoS(10, false, REJECT_INVALID, "bad-txns-vout-empty");
  // Size limits (this doesn't take the witness into account, as that hasn't been checked for malleability)
  - if (::GetSerializeSize(tx, SER_NETWORK, PROTOCOL_VERSION | SERIALIZE_TRANSACTION_NO_WITNESS) * WITNESS_SCALE_FACTOR > dgpMaxBlockWeight)
  + if (::GetSerializeSize(tx, SER_NETWORK, PROTOCOL_VERSION | SERIALIZE_TRANSACTION_NO_WITNESS) > MAX_TRANSACTION_BASE_SIZE ||
  + ::GetSerializeSize(tx, SER_NETWORK, PROTOCOL_VERSION | SERIALIZE_TRANSACTION_NO_WITNESS) * WITNESS_SCALE_FACTOR > dgpMaxBlockWeight)
  return state.DoS(100, false, REJECT_INVALID, "bad-txns-oversize");
  // Check for negative or overflow output values
  CAmount nValueOut = 0;
  for (const auto& txout : tx.vout)
  {
  + if (txout.IsEmpty() && !tx.IsCoinBase() && !tx.IsCoinStake())
  + return state.DoS(100, false, REJECT_INVALID, "bad-txns-vout-empty");
  if (txout.nValue < 0)
  return state.DoS(100, false, REJECT_INVALID, "bad-txns-vout-negative");
  if (txout.nValue > MAX_MONEY)
  @@ -178,6 +182,16 @@ bool CheckTransaction(const CTransaction& tx, CValidationState &state, bool fChe
  nValueOut += txout.nValue;
  if (!MoneyRange(nValueOut))
  return state.DoS(100, false, REJECT_INVALID, "bad-txns-txouttotal-toolarge");
  +
  + /////////////////////////////////////////////////////////// // qtuma
  + if (txout.scriptPubKey.HasOpCall() || txout.scriptPubKey.HasOpCreate()) {
  + std::vector<valtype> vSolutions;
  + txnouttype whichType;
  + if (!Solver(txout.scriptPubKey, whichType, vSolutions, true)) {
  + return state.DoS(100, false, REJECT_INVALID, "bad-txns-contract-nonstandard");
  + }
  + }
  + ///////////////////////////////////////////////////////////
  }
  // Check for duplicate inputs - note that this check is slow so we skip it in CheckBlock
  