   (miner/mine-and-commit-db)
   (is (= 0 (count @db/transaction-pool)))
   (let [txn (miner/generate-payment wallet/keypair (:address wallet/keypair) 25 (q/longest-chain @db/db))]
-    (handler {:message "add_peer" :payload {:port test-port-2}} sock-info)
+    (handler {:message "add_peer" :payload {:port test-port}} sock-info)
     ;; send same txn twice but should only get forwarded once
     (is (= {:message "transaction-accepted" :payload txn}
            (handler {:message "submit_transaction" :payload txn} sock-info)))

    (is (= 1 (q/chain-length @db/db)))))

(deftest test-forwarding-received-blocks-to-peers
  (q/add-peer! db/db {:port test-port-2 :host "127.0.0.1"})
  (let [b (miner/mine (blocks/generate-block [(miner/coinbase)]))]
    (handler {:message "submit_block" :payload b} sock-info)
    (is (= 1 (q/chain-length @db/db)))

  (reset! db/transaction-pool #{})
  (reset! db/db db/empty-db))

(use-fixtures :each with-db with-peer)

(deftest test-echo
  (let [msg {:message "echo"
