message: [RPC] Error early when block doesn't start with a coinbase transaction
  submitblock (used for PoW) can return an error message earlier by
  checking that the first transaction is a coinbase transaction.
  This prevents wasting time with running the block through later
  validation checks that will ultimately fail.
diff: @@ -661,6 +661,10 @@ UniValue submitblock(const UniValue& params, bool fHelp)
  if (!DecodeHexBlk(block, params[0].get_str()))
  throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "Block decode failed");
  + if (block.vtx.empty() || !block.vtx[0].IsCoinBase()) {
  + throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "Block does not start with a coinbase");
  + }
  +
  uint256 hash = block.GetHash();
  bool fBlockPresent = false;
  {
  