   "Creates a new block with random content at most `max-size` bytes long."
   [max-size]
   (block/read!
-    (bytes/random-bytes (inc (rand-int max-size)))
+    (random-bytes (inc (rand-int max-size)))
     (rand-nth (keys digest/functions))))
 
 


    :delete-batch!
      (let [contained-ids (keep (set args) (keys model))]
        (is (= (set contained-ids) result)))))


(defn- update-model

  "Applies an operation to the store by using the op keyword to resolve a method
  in the `blocks.core` namespace. Returns the result of calling the method."
  [store [op-key args]]
  ;(println ">>" op-key (pr-str args))
  (case op-key
    :open-block
      (block/get store args)

    :open-block-range
      (block/get store (first args))

    (let [var-name (symbol (name op-key))
          method (ns-resolve 'blocks.core var-name)]
      (method store args))))


