From 5fdf463b128fe54bd8ff10573a3fc94c77adc3cc Mon Sep 17 00:00:00 2001 From: Edmund Noble Date: Wed, 30 Oct 2024 12:47:42 -0400 Subject: [PATCH] wip: use mapMonotonic to compute session peer addresses not sure if this needs to change the Ord instance for PeerInfo to use _peerAddr as the first entry. --- src/P2P/Node.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/P2P/Node.hs b/src/P2P/Node.hs index 8705b6c654..9ed05f3e16 100644 --- a/src/P2P/Node.hs +++ b/src/P2P/Node.hs @@ -570,7 +570,7 @@ findNextPeer conf node = do -- check (int sessionCount < _p2pConfigMaxSessionCount conf) - let addrs = S.fromList (_peerAddr <$> M.keys sessions) + let addrs = S.mapMonotonic _peerAddr (M.keysSet sessions) -- peerList and candidates are supposed to be lazy. With the -- transation we only check that the result is not empty, which