message: Fixed bug(Transaction gas limit checking before execution is done on the output level).
diff: @@ -777,6 +777,7 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C
  std::vector<QtumTransaction> qtumTransactions = resultConverter.first;
  std::vector<EthTransactionParams> qtumETP = resultConverter.second;
  + dev::u256 gasAllTxs = dev::u256(0);
  for(QtumTransaction qtumTransaction : qtumTransactions){
  sumGas += CAmount(qtumTransaction.gas() * qtumTransaction.gasPrice());
  @@ -801,6 +802,10 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C
  if(qtumTransaction.gas() > UINT32_MAX)
  return state.DoS(100, error("AcceptToMempool(): Contract execution can not specify greater gas limit than can fit in 32-bits"), REJECT_INVALID, "bad-tx-too-much-gas");
  + gasAllTxs += qtumTransaction.gas();
  + if(gasAllTxs > dev::u256(blockGasLimit))
  + return state.DoS(100, false, REJECT_INVALID, "bad-txns-much-gas");
  +
  //don't allow less than DGP set minimum gas price to prevent MPoS greedy mining/spammers
  if(v.rootVM!=0 && (uint64_t)qtumTransaction.gasPrice() < minGasPrice)
  return state.DoS(100, error("AcceptToMempool(): Contract execution has lower gas price than allowed"), REJECT_INVALID, "bad-tx-low-gas-price");
  @@ -2677,6 +2682,8 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
  if(!CheckMinGasPrice(resultConvertQtumTX.second, minGasPrice))
  return state.DoS(100, error("ConnectBlock(): Contract execution has lower gas price than allowed"), REJECT_INVALID, "bad-tx-low-gas-price");
  +
  + dev::u256 gasAllTxs = dev::u256(0);
  ByteCodeExec exec(block, resultConvertQtumTX.first, blockGasLimit);
  //validate VM version and other ETH params before execution
  //Reject anything unknown (could be changed later by DGP)
  @@ -2703,6 +2710,10 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
  if(qtx.gas() > UINT32_MAX)
  return state.DoS(100, error("ConnectBlock(): Contract execution can not specify greater gas limit than can fit in 32-bits"), REJECT_INVALID, "bad-tx-too-much-gas");
  + gasAllTxs += qtx.gas();
  + if(gasAllTxs > dev::u256(blockGasLimit))
  + return state.DoS(100, false, REJECT_INVALID, "bad-txns-much-gas");
  +
  //don't allow less than DGP set minimum gas price to prevent MPoS greedy mining/spammers
  if(v.rootVM!=0 && (uint64_t)qtx.gasPrice() < minGasPrice)
  return state.DoS(100, error("ConnectBlock(): Contract execution has lower gas price than allowed"), REJECT_INVALID, "bad-tx-low-gas-price");
  