Added the heartbeat key statechanged. It is passed on in the heartbeat broadcasts, and checked before sending a query to the server