haskoin-node 0.17.12 → 0.17.13
raw patch · 3 files changed
+15/−9 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +4/−0
- haskoin-node.cabal +3/−3
- src/Haskoin/Node/Peer.hs +8/−6
CHANGELOG.md view
@@ -4,6 +4,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## 0.17.13+### Added+- Display more details about invalid incoming headers.+ ## 0.17.12 ### Fixed - Do not connect to more than the maximum number of peers.
haskoin-node.cabal view
@@ -1,13 +1,13 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.33.0.+-- This file has been generated from package.yaml by hpack version 0.34.4. -- -- see: https://github.com/sol/hpack ----- hash: 083f732d2e52665302507d77fe2ebfaa42823fd2648e9987889b6057360bf91f+-- hash: c1a4396b3f82b4a278470d6085ab2c65b132c37bfc67dca1c21dfe8277bf0775 name: haskoin-node-version: 0.17.12+version: 0.17.13 synopsis: P2P library for Bitcoin and Bitcoin Cash description: Please see the README on GitHub at <https://github.com/haskoin/haskoin-node#readme> category: Bitcoin, Finance, Network
src/Haskoin/Node/Peer.hs view
@@ -50,8 +50,8 @@ MessageHeader (..), Network (..), NotFound (..), Ping (..), Pong (..), Tx, TxHash (..), commandToString,- getMessage, headerHash, putMessage,- txHash)+ encodeHex, getMessage, headerHash,+ putMessage, txHash) import NQE (Inbox, Mailbox, Publisher, inboxToMailbox, publish, receive, receiveMatchS, send,@@ -185,10 +185,12 @@ forever $ do x <- takeCE 24 .| foldC case decode x of- Left _ -> do- $(logErrorS)- (peerLog a)- "Could not decode incoming message header"+ Left e -> do+ $(logErrorS) (peerLog a) $+ "Could not decode message header: " <>+ encodeHex x+ $(logErrorS) (peerLog a) $+ "Error: " <> cs e throwIO DecodeHeaderError Right (MessageHeader _ cmd len _) -> do when (len > 32 * 2 ^ (20 :: Int)) $ do