haskoin-core 0.20.2 → 0.20.3
raw patch · 3 files changed
+10/−4 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Haskoin.Network.Common: InvType :: Word32 -> InvType
Files
- CHANGELOG.md +4/−0
- haskoin-core.cabal +2/−2
- src/Haskoin/Network/Common.hs +4/−2
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.20.3+### Fixed+- Allow unknown inv types.+ ## 0.20.2 ### Fixed - Allow unknown messages of zero length.
haskoin-core.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 460dd0e8508262fb1b685467ea87f00e9793d37026ca63ec280adc2699d21810+-- hash: 51a1645e2f8c2dc54a6cc91c03a262683a314702f2ffbc182667967b50e88f6f name: haskoin-core-version: 0.20.2+version: 0.20.3 synopsis: Bitcoin & Bitcoin Cash library for Haskell description: Please see the README on GitHub at <https://github.com/haskoin/haskoin-core#readme> category: Bitcoin, Finance, Network
src/Haskoin/Network/Common.hs view
@@ -183,7 +183,8 @@ | InvMerkleBlock -- ^ filtered block | InvWitnessTx -- ^ segwit transaction | InvWitnessBlock -- ^ segwit block- | InvWitnessMerkleBlock -- ^ segwit filtere block+ | InvWitnessMerkleBlock -- ^ segwit filtered block+ | InvType Word32 -- ^ unknown inv type deriving (Eq, Show, Read, Generic, NFData) instance Serial InvType where@@ -199,7 +200,7 @@ | x == 1 `shiftL` 30 + 1 -> return InvWitnessTx | x == 1 `shiftL` 30 + 2 -> return InvWitnessBlock | x == 1 `shiftL` 30 + 3 -> return InvWitnessMerkleBlock- | otherwise -> fail "bitcoinGet InvType: Invalid Type"+ | otherwise -> return (InvType x) serialize x = putWord32le $ case x of@@ -210,6 +211,7 @@ InvWitnessTx -> 1 `shiftL` 30 + 1 InvWitnessBlock -> 1 `shiftL` 30 + 2 InvWitnessMerkleBlock -> 1 `shiftL` 30 + 3+ InvType w -> w instance Binary InvType where get = deserialize