                       (do (Thread/sleep 25) (recur (inc i))))))))
             :lru/threshold 400))
 
-(defrecord RedisAddr [last-key redis-key]
+(defn synthesize-storage-addr
+  "Given a key, returns a promise containing that key for use as a storage-addr"
+  [key]
+  (doto (promise)
+    (deliver key)))
+
+(defrecord RedisAddr [last-key redis-key storage-addr]
   core/IResolve
   (dirty? [_] false)
   (last-key [_] last-key)
   (resolve [_] (let [x (-> (totally-fetch redis-key)
-                   (assoc :storage-addr
-                          (doto (promise)
-                            (deliver redis-key))))]
+                   (assoc :storage-addr (synthesize-storage-addr redis-key)))]
                  ;(println "Deser:" x)
+                 (when (and (core/index-node? x)
+                            (some #(not (satisfies? msg/IOperation %)) (:op-buf x)))
+                   (println (str "Found a broken node, has " (count (:op-buf x)) " ops"))
+                   (println (str "The node data is " x))
+                   (println "the node's class is" (class x))
+                   (println "and it has keys" (:keys x))
+                   (println "And is it an index-node?" (core/index-node? x))
+                   (println "It came from" redis-key)
+                   (println (str "and " (:op-buf x))))
                  x
                  )))
+
+(comment
+  (:cfg (wcar {} (car/get "b89bb965-e584-45a2-9232-5b76bf47a21c")))
+  (update-in {:op-buf [1 2 3]} [:op-buf] into [4 5 6])
+  )
+
+(defn redis-addr
+  [last-key redis-key]
+  (->RedisAddr last-key redis-key (synthesize-storage-addr redis-key)))
+
+(nippy/extend-freeze RedisAddr :b-tree/redis-addr
+                     [{:keys [last-key redis-key]} data-output]
+                     (nippy/freeze-to-out! data-output last-key)
+                     (nippy/freeze-to-out! data-output redis-key))
+
+(nippy/extend-thaw :b-tree/redis-addr
+                   [data-input]
+                   (let [last-key (nippy/thaw-from-in! data-input)
+                         redis-key (nippy/thaw-from-in! data-input)]
+                     (redis-addr last-key redis-key)))
+
 
 (defrecord RedisBackend [#_service]
   core/IBackend

                   (->RedisBackend)
                   ))
  )

  [root-key]
  (let [last-key (core/last-key (wcar {} (car/get root-key)))] ; need last key to bootstrap
    (core/resolve
      (->RedisAddr last-key root-key (synthesize-storage-addr root-key)))))

(comment
  (wcar {} (car/ping) (car/set "foo" "bar") (car/get "foo"))
