anchor.diff:      {keep_state, State, [{reply, From, ok}]};
   running({call, From}, suspend, State) ->
       epoch_mining:info("Mining suspended by user.", []),
  -    {next_state, idle, State, [{reply, From, ok}]};
  +    kill_miner(State#state.miner),
  +    {next_state, idle, State#state{miner = none}, [{reply, From, ok}]};
   
   %% Casts: post_block | miner_done | create_block_candidate |
   %%        bump_initial_cycle_nonce | mine | check_keys
  
positive.code:     case int_post_block(Block, State) of
          new_top ->
              start_if_auto(State),
              {next_state, configure, State};
          error ->
              {next_state, running, State};
          ok ->
  
negative.code: mine_event()          -> cast_event(mine).
  cast_event(Msg)       -> next_event(cast, Msg).
  next_event(Type, Msg) -> {next_event, Type, Msg}.
  
  kill_miner(none) ->
      ok;
  kill_miner(P) when is_pid(P) ->
      exit(P, normal),
      ok.
  