They check whether they're running on testnet by accessing the m_rpc_server object, which does not exist when in RPC mode. Also, fix hard_fork_info being called with the wrong API.