                           :leader-commit (:commit-index state)})))
 
 (defn- send-request-vote [state peer]
-  (request-vote peer {:term (:current-term state)
-                      :candidate-id (:id state)
-                      :last-log-index (:commit-index state)
-                      :last-log-term (get-log-term state)}))
-
+  {:dest peer
+   :body {:term (:current-term state)
+          :candidate-id (:id state)
+          :last-log-index (:commit-index state)
+          :last-log-term (get-log-term state)}})
+  ;; (request-vote peer {))
 
 (defn- broadcast-heartbeat [state]
   (doseq [r (map (partial send-heart-beat state) (:peers state))])

   :voted-for nil  ; persist
   :log [{:term 0 :cmd :init}]         ; persist start at 1
   :id id          ; user assigned
   :commit-index 0
   :last-applied 0
   :type :follower


; yuck
(defn- append-log [state params]
  (swap! state #(-> %1
                    (assoc :election-timeout (random-election-timeout))
                    (check-term params)
                    (update-in [:log] conj (:entries params))))
  (when (> (:leader-commit params) (:commit-index @state))
    (swap! state assoc :commit-index
           (min (:leader-commit params) (count (:log @state))))))
