               ::specs/error K/eof-error))))
 
 (s/fdef build-message-block-description
-        :args (s/cat :message-loop-name ::specs/message-loop-name
+        :args (s/cat :log-state ::log2/state
                      :block-description ::specs/block)
-        :ret bytes?)
+        :ret {::specs/bs-or-eof
+              ::log2/state})
 (defn build-message-block-description
-  ^ByteBuf [message-loop-name
-            {^Long start-pos ::specs/start-pos
-             ^Integer next-message-id ::specs/message-id
-             ;; TODO: Switch this to either a bytes or a clojure
-             ;; vector of bytes.
-             ;; Then again...the bit about tracking the current
-             ;; read position seems pretty worthwhile.
-             ^ByteBuf buf ::specs/buf
-             :as block-to-send}]
+  [log-state
+   {^Long start-pos ::specs/start-pos
+    ^Integer next-message-id ::specs/message-id
+    ;; TODO: Switch this to either a bytes or a clojure
+    ;; vector of bytes.
+    ;; Then again...the bit about tracking the current
+    ;; read position seems pretty worthwhile.
+    ^ByteBuf buf ::specs/buf
+    :as block-to-send}]
   ;;; Lines 387-402
 
   ;; Note that we're messing around with mutable data.

          ;; TODO: That.
          send-buf (.order (Unpooled/buffer u)
                           java.nio.ByteOrder/LITTLE_ENDIAN)
          flag-size (calculate-message-data-packet-length-flags block-to-send)]
      (log/debug (utils/pre-log message-loop-name)
                 (str "Building a Message Block byte array for message "
                      next-message-id
                      "\nTotal length: " u
                      "\nSize | Flags: " flag-size
                      "\nStart Position: " start-pos))

      ;; Q: Is this worth switching to shared/compose?
      (.writeInt send-buf next-message-id)


      (check-for-new-block-to-send found?))))

(s/fdef block->parent!
        :args (s/cat :logger ::log2/logger
                     :log-state ::log2/state
                     :->parent ::specs/->parent
                     :send-buf ::specs/buf)
        :ret ::log2/state)
(defn block->parent!
  "Actually send the message block to the parent"
  ;; Corresponds to line 404 under the sendblock: label
  [message-loop-name
   logger
   log-state
   ->parent
   ^bytes send-buf]
  {:pre [send-buf]}
