packages feed

haskoin-node 1.4.1 → 1.4.2

raw patch · 3 files changed

+17/−5 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -4,6 +4,12 @@ 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). +## [1.4.2] - 2026-08-13++### Fixed++- Fix regression with peer selection.+ ## [1.4.1] - 2026-08-13  ### Removed
haskoin-node.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack  name:           haskoin-node-version:        1.4.1+version:        1.4.2 synopsis:       P2P library for Bitcoin and Bitcoin Cash description:    Please see the README on GitHub at <https://github.com/jprupp/haskoin-node#readme> category:       Bitcoin, Finance, Network
src/Haskoin/Node/PeerMgr.hs view
@@ -329,10 +329,16 @@       $(logWarnS) "PeerMgr" ("Not announcing disconnected peer " <> p.label)  getNewPeer :: (MonadIO m) => PeerMgr -> m (Maybe SockAddr)-getNewPeer mgr = do-  loadPeers mgr-  atomically . stateTVar mgr.addresses $-    first (listToMaybe . Set.elems) . Set.splitAt 1+getNewPeer mgr =+  g >>= \case+    Nothing -> loadPeers mgr >> g+    Just a -> return (Just a)+  where+    g =+      atomically $+        stateTVar+          mgr.addresses+          (first (listToMaybe . Set.elems) . Set.splitAt 1)  connectPeer :: (MonadUnliftIO m, MonadLoggerIO m) => PeerMgr -> SockAddr -> m () connectPeer mgr sa = do