Reported here: https://github.com/bitcoin/bitcoin/pull/10244#issuecomment-378035305

Travis log here: https://travis-ci.org/bitcoin/bitcoin/jobs/361243719#L2810

Note the JSON exception:

```
test_framework.authproxy.JSONRPCException: The mempool was not loaded yet (-1) 
```

That exception was introduced here: https://github.com/bitcoin/bitcoin/commit/cb1e319fe9e198c9c5cf5236fe9af5a3d748b9e8#diff-a0c8f511d90e83aa9b5857e819ced344R1617

cc @jtimon 
CValidationState state;
    ActivateBestChain(state, Params());
    if (!state.IsValid()) {
        throw JSONRPCError(RPC_DATABASE_ERROR, FormatStateMessage(state));
    }
    return NullUniValue;
}
static UniValue getchaintxstats(const JSONRPCRequest& request)
{
    if (request.fHelp || request.params.size() > 2)
        throw std::runtime_error(
            RPCHelpMan{"getchaintxstats",
                "\nCompute statistics about the total number and rate of transactions in the chain.\n",
                {
                    {"nblocks", RPCArg::Type::NUM,  "one month", "Size of the window in number of blocks"},
                    {"blockhash", RPCArg::Type::STR_HEX,  "chain tip", "The hash of the block that ends the window."},
                },
                RPCResult{
            "{\n"
            "  \"time\": xxxxx,                         (numeric) The timestamp for the final block in the window in UNIX format.\n"
            "  \"txcount\": xxxxx,                      (numeric) The total number of transactions in the chain up to that point.\n"
            "  \"window_final_block_hash\": \"...\",      (string) The hash of the final block in the window.\n"
            "  \"window_block_count\": xxxxx,           (numeric) Size of the window in number of blocks.\n"
            "  \"window_tx_count\": xxxxx,              (numeric) The number of transactions in the window. Only returned if \"window_block_count\" is > 0.\n"
            "  \"window_interval\": xxxxx,              (numeric) The elapsed time in the window in seconds. Only returned if \"window_block_count\" is > 0.\n"
            "  \"txrate\": x.xx,                        (numeric) The average rate of transactions per second in the window. Only returned if \"window_interval\" is > 0.\n"
            "}\n"
                },
                RPCExamples{
                    HelpExampleCli("getchaintxstats", "")