                        (assoc node ::children)
                        (mdag/store-node! store nil)
                        (::node/data))))]
-        (store! (update-index-node store params nil [root changes])))
+        ; TODO: handle vector return type
+        (store! (update-index-node! store params nil root changes)))
 
     :else
       (throw (ex-info (str "Unsupported index-tree node type: "

      (let [index-groups (part/partition-limited
                           (::branching-factor params default-branching-factor)
                           layer)]
        (recur (mapv (partial store-index! store height) index-groups)
               (inc height))))))




    ; Root is a partition node.
    (= part/data-type (:data/type root))
      (let [result (part/update-partitions! store params [[root changes]])]
        (if (neg? (first result))
          (part/from-records store params (second result))
          (from-partitions store params (second result))))

    ; Root is an index node.
    (= data-type (:data/type root))
      (letfn [(store! ; TODO: delay storage like this?
                [node]
                (if (mdag/link? node)
                  node
