Skip to content

Commit

Permalink
add a log for each transfer transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
yito88 committed Nov 23, 2024
1 parent 1949e3e commit 9372067
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scalardb/src/scalardb/transfer.clj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(ns scalardb.transfer
(:require [clojure.core.reducers :as r]
[clojure.tools.logging :refer [warn]]
[clojure.tools.logging :refer [info warn]]
[jepsen
[client :as client]
[checker :as checker]
Expand Down Expand Up @@ -86,6 +86,7 @@

(defn- tx-transfer
[tx from to amount]
(info "Transferring" amount "from" from "to" to "by tx" (.getId tx))
(let [fromResult (.get tx (prepare-get from))
toResult (.get tx (prepare-get to))]
(->> (calc-new-balance fromResult (- amount))
Expand Down

0 comments on commit 9372067

Please sign in to comment.