anchor.diff:      epoch_mining:error("Unknown miner finished: ~p~n", [Miner]),
       {keep_state, State#state{ miner = OtherMiner }};
   running(cast, create_block_candidate, State) ->
  -    {next_state, configure, State, [postpone]};
  +    kill_miner(State#state.miner),
  +    {next_state, configure, State#state{miner = none}, [postpone]};
   running(cast, bump_initial_cycle_nonce, State) ->
  -    {next_state, configure, State, [postpone]};
  +    kill_miner(State#state.miner),
  +    {next_state, configure, State#state{miner = none}, [postpone]};
   running(cast, mine, #state{block_candidate = BlockCandidate,
                              initial_cycle_nonce = CurrentMiningNonce,
                              miner = none}
  
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.
  