From bbe8777c673f89be5e90f51d78bf6849a3c0607c Mon Sep 17 00:00:00 2001 From: Heinrich Apfelmus Date: Wed, 17 Apr 2024 16:00:35 +0200 Subject: [PATCH] wip Change `chainSync` to use `Read.ChainTip` --- lib/network-layer/src/Cardano/Wallet/Network.hs | 2 +- .../src/Cardano/Wallet/Network/Implementation.hs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/network-layer/src/Cardano/Wallet/Network.hs b/lib/network-layer/src/Cardano/Wallet/Network.hs index 6800c36ce1f..0a96771faa7 100644 --- a/lib/network-layer/src/Cardano/Wallet/Network.hs +++ b/lib/network-layer/src/Cardano/Wallet/Network.hs @@ -113,7 +113,7 @@ import qualified Internal.Cardano.Write.Tx as Write data NetworkLayer m block = NetworkLayer { chainSync :: Tracer IO ChainFollowLog - -> ChainFollower m Read.ChainPoint BlockHeader (NonEmpty block) + -> ChainFollower m Read.ChainPoint Read.ChainTip (NonEmpty block) -> m () -- ^ Connect to the node and run the ChainSync protocol. -- The callbacks provided in the 'ChainFollower' argument diff --git a/lib/network-layer/src/Cardano/Wallet/Network/Implementation.hs b/lib/network-layer/src/Cardano/Wallet/Network/Implementation.hs index 384303acf61..6a3fcc7ec8c 100644 --- a/lib/network-layer/src/Cardano/Wallet/Network/Implementation.hs +++ b/lib/network-layer/src/Cardano/Wallet/Network/Implementation.hs @@ -86,6 +86,7 @@ import Cardano.Wallet.Network.Implementation.Ouroboros ) import Cardano.Wallet.Network.Implementation.Types ( fromOuroborosPoint + , fromOuroborosTip , toOuroborosPoint ) import Cardano.Wallet.Network.Implementation.UnliftIO @@ -480,7 +481,6 @@ withNodeNetworkLayerBase withStats $ \trChainSyncLog -> do let mapB = getBlockHeader getGenesisBlockHash mapP = fromOuroborosPoint - let blockHeader = fromTip' gp let client = mkWalletClient (mapChainSyncLog mapB mapP >$< trChainSyncLog) @@ -488,7 +488,7 @@ withNodeNetworkLayerBase (mapChainFollower toOuroborosPoint mapP - blockHeader + fromOuroborosTip id follower )