message: sendtocontract: add error message if gas limit is above block's limit
diff: @@ -631,6 +631,7 @@ UniValue sendtocontract(const JSONRPCRequest& request){
  return NullUniValue;
  QtumDGP qtumDGP(globalState.get(), fGettingValuesDGP);
  + uint64_t blockGasLimit = qtumDGP.getBlockGasLimit(chainActive.Height()+1);
  uint64_t minGasPrice = CAmount(qtumDGP.getMinGasPrice(chainActive.Height()+1));
  CAmount nGasPrice = (minGasPrice>DEFAULT_GAS_PRICE)?minGasPrice:DEFAULT_GAS_PRICE;
  @@ -643,7 +644,7 @@ UniValue sendtocontract(const JSONRPCRequest& request){
  "1. \"contractaddress\" (string, required) The contract address that will receive the funds and data.\n"
  "2. \"datahex\" (string, required) data to send.\n"
  "3. \"amount\" (numeric or string, optional) The amount in " + CURRENCY_UNIT + " to send. eg 0.1, default: 0\n"
  - "4. gasLimit (numeric or string, optional) gasLimit, default: "+i64tostr(DEFAULT_GAS_LIMIT_OP_SEND)+"\n"
  + "4. gasLimit (numeric or string, optional) gasLimit, default: "+i64tostr(DEFAULT_GAS_LIMIT_OP_SEND)+", max: "+i64tostr(blockGasLimit)+"\n"
  "5. gasPrice (numeric or string, optional) gasPrice Qtum price per gas unit, default: "+FormatMoney(nGasPrice)+", min:"+FormatMoney(minGasPrice)+"\n"
  "6. \"senderaddress\" (string, optional) The quantum address that will be used as sender.\n"
  "7. \"broadcast\" (bool, optional, default=true) Whether to broadcast the transaction or not.\n"
  @@ -682,6 +683,8 @@ UniValue sendtocontract(const JSONRPCRequest& request){
  uint64_t nGasLimit=DEFAULT_GAS_LIMIT_OP_SEND;
  if (request.params.size() > 3){
  nGasLimit = request.params[3].get_int64();
  + if (nGasLimit > blockGasLimit)
  + throw JSONRPCError(RPC_TYPE_ERROR, "Invalid value for gasLimit (Maximum is: "+i64tostr(blockGasLimit)+")");
  if (nGasLimit <= 0)
  throw JSONRPCError(RPC_TYPE_ERROR, "Invalid value for gasLimit");
  }
  