           reuseaddr: true,
         ])
 
-    state = State.new() |> State.schedule_leader_election(self())
+    state = State.new() |> State.reset_election_timer(self())
+    State.schedule_append_entries(self())
 
     {:ok, state}
   end


    def handle_rpc(state, _member, %RPC.ReplyAppendEntries{} = rpc) do
      Logger.info("Got append entries reply: #{inspect rpc}")

      {nil, state}
    end


      state =
        if vote_granted do
          %{state | role: :follower, voted_for: rpc.candidate}
        else
          state
        end
