anchor.diff:      (multiple-value-bind (cksm len) (checksum-payload msg)
         (setf (slot-value msg 'checksum) cksm)
         (setf (slot-value msg 'len) len)
  -      (bindata:write-value 'msg-version (slot-value remote 'tcp-socket) msg))))
  +      (bindata:write-value 'msg-version (slot-value remote 'write-stream) msg))))
   
   (defun send-verack (remote)
     (let ((msg (make-instance 'msg-verack
  
positive.code:    (port :initarg :port)
     (net :initarg net :initform 'testnet3)
     (handshaken :initform #b00) ; low bit means version rec'd, 2nd is verack rec'd
     (tcp-socket)))
  
  (defun event-cb (ev)
    (handler-case
  
negative.code:     (multiple-value-bind (cksm len) (checksum-payload msg)
        (setf (slot-value msg 'checksum) cksm)
        (setf (slot-value msg 'len) len)
        (bindata:write-value 'msg-verack (slot-value remote 'write-stream) msg))))
  
  (defun start-peer (remote)
    (as:with-event-loop (:catch-app-errors nil)
      (as:signal-handler as:+sigint+
                       (lambda (sig)
                         (declare (ignore sig))
                         (format t "~&got sigint, stopping peer...~%")
                         (as:exit-event-loop)))
      (let ((tcpsock (as:tcp-connect (slot-value remote 'host)
                                    (slot-value remote 'port)
                                    (make-read-cb remote)
                                    :event-cb #'event-cb)))
        (setf (slot-value remote 'tcp-socket) tcpsock)
        (setf (slot-value remote 'write-stream)
              (make-instance 'as:async-output-stream :socket tcpsock)))
      (send-version remote)))
  