packages feed

haskoin-store 0.65.2 → 0.65.3

raw patch · 4 files changed

+17/−25 lines, 4 filesdep ~haskoin-nodePVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: haskoin-node

API changes (from Hackage documentation)

- Haskoin.Store: StoreConfig :: !Int -> ![HostPort] -> !Bool -> !FilePath -> !Network -> !Maybe String -> !Word32 -> !Word32 -> !Int -> !Integer -> !Bool -> !Bool -> !Bool -> !NominalDiffTime -> !NominalDiffTime -> !SockAddr -> WithConnection -> !Int -> !Maybe Store -> StoreConfig
+ Haskoin.Store: StoreConfig :: !Int -> ![String] -> !Bool -> !FilePath -> !Network -> !Maybe String -> !Word32 -> !Word32 -> !Int -> !Integer -> !Bool -> !Bool -> !Bool -> !NominalDiffTime -> !NominalDiffTime -> !SockAddr -> WithConnection -> !Int -> !Maybe Store -> StoreConfig
- Haskoin.Store: [storeConfInitPeers] :: StoreConfig -> ![HostPort]
+ Haskoin.Store: [storeConfInitPeers] :: StoreConfig -> ![String]
- Haskoin.Store.Manager: StoreConfig :: !Int -> ![HostPort] -> !Bool -> !FilePath -> !Network -> !Maybe String -> !Word32 -> !Word32 -> !Int -> !Integer -> !Bool -> !Bool -> !Bool -> !NominalDiffTime -> !NominalDiffTime -> !SockAddr -> WithConnection -> !Int -> !Maybe Store -> StoreConfig
+ Haskoin.Store.Manager: StoreConfig :: !Int -> ![String] -> !Bool -> !FilePath -> !Network -> !Maybe String -> !Word32 -> !Word32 -> !Int -> !Integer -> !Bool -> !Bool -> !Bool -> !NominalDiffTime -> !NominalDiffTime -> !SockAddr -> WithConnection -> !Int -> !Maybe Store -> StoreConfig
- Haskoin.Store.Manager: [storeConfInitPeers] :: StoreConfig -> ![HostPort]
+ Haskoin.Store.Manager: [storeConfInitPeers] :: StoreConfig -> ![String]

Files

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.65.3+### Added+- IPv6 peer support.+ ## 0.65.2 ### Fixed - Correct lazy bytestring deserialization algorithm for web client.
app/Main.hs view
@@ -94,7 +94,7 @@     configPort :: !Int,     configNetwork :: !String,     configDiscover :: !Bool,-    configPeers :: ![(String, Maybe Int)],+    configPeers :: ![String],     configVersion :: !Bool,     configDebug :: !Bool,     configMaxPending :: !Int,@@ -231,10 +231,10 @@     defEnv "DISCOVER" False parseBool {-# NOINLINE defDiscover #-} -defPeers :: [(String, Maybe Int)]+defPeers :: [String] defPeers =   unsafePerformIO $-    defEnv "PEER" [] (mapM (eitherToMaybe . peerReader) . words)+    defEnv "PEER" [] (pure . words) {-# NOINLINE defPeers #-}  defDebug :: Bool@@ -436,7 +436,7 @@   configPeers <-     fmap (mappend defPeers) $       many $-        option (eitherReader peerReader) $+        option auto $           metavar "HOST"             <> long "peer"             <> short 'p'@@ -670,19 +670,9 @@   | s == getNetworkName bchRegTest = Right bchRegTest   | otherwise = Left "Network name invalid" -peerReader :: String -> Either String (String, Maybe Int)-peerReader s = do-  let (host, p) = span (/= ':') s-  when (null host) (Left "Peer name or address not defined")-  port <--    case p of-      [] -> return Nothing-      ':' : p' ->-        case readMaybe p' of-          Nothing -> Left "Peer port number cannot be read"-          Just n -> return (Just n)-      _ -> Left "Peer information could not be parsed"-  return (host, port)+peerReader :: String -> Either String String+peerReader "" = Left "Peer cannot be blank"+peerReader s = Right s  main :: IO () main = do@@ -746,8 +736,7 @@       let scfg =             StoreConfig               { storeConfMaxPeers = maxpeers,-                storeConfInitPeers =-                  map (second (fromMaybe (getDefaultPort net))) peers,+                storeConfInitPeers = peers,                 storeConfDiscover = disc,                 storeConfDB = wd net </> "db",                 storeConfNetwork = net,
haskoin-store.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack  name:           haskoin-store-version:        0.65.2+version:        0.65.3 synopsis:       Storage and index for Bitcoin and Bitcoin Cash description:    Please see the README on GitHub at <https://github.com/haskoin/haskoin-store#readme> category:       Bitcoin, Finance, Network@@ -60,7 +60,7 @@     , hashable >=1.3.0.0     , hashtables >=1.2.4.2     , haskoin-core >=0.21.1-    , haskoin-node >=0.17.0+    , haskoin-node >=0.18.0     , haskoin-store-data ==0.65.2     , hedis >=0.12.13     , http-types >=0.12.3@@ -116,7 +116,7 @@     , hashable >=1.3.0.0     , hashtables >=1.2.4.2     , haskoin-core >=0.21.1-    , haskoin-node >=0.17.0+    , haskoin-node >=0.18.0     , haskoin-store     , haskoin-store-data ==0.65.2     , hedis >=0.12.13@@ -178,7 +178,7 @@     , hashable >=1.3.0.0     , hashtables >=1.2.4.2     , haskoin-core >=0.21.1-    , haskoin-node >=0.17.0+    , haskoin-node >=0.18.0     , haskoin-store     , haskoin-store-data ==0.65.2     , hedis >=0.12.13
src/Haskoin/Store/Manager.hs view
@@ -32,7 +32,6 @@ import Haskoin.Node   ( Chain,     ChainEvent (..),-    HostPort,     Node (..),     NodeConfig (..),     NodeEvent (..),@@ -109,7 +108,7 @@   { -- | max peers to connect to     storeConfMaxPeers :: !Int,     -- | static set of peers to connect to-    storeConfInitPeers :: ![HostPort],+    storeConfInitPeers :: ![String],     -- | discover new peers     storeConfDiscover :: !Bool,     -- | RocksDB database path