From fef748288d34cf7378c6e06162508c0908391c92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20W=C3=B3jtowicz?= Date: Mon, 22 Apr 2024 11:16:36 +0200 Subject: [PATCH] wip - review fix --- cardano-api/internal/Cardano/Api/Query.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cardano-api/internal/Cardano/Api/Query.hs b/cardano-api/internal/Cardano/Api/Query.hs index 3bfd4d30ac..3248681557 100644 --- a/cardano-api/internal/Cardano/Api/Query.hs +++ b/cardano-api/internal/Cardano/Api/Query.hs @@ -146,6 +146,8 @@ import Data.Text (Text) import qualified Data.Text as Text import Data.Word (Word64) import GHC.Stack +import qualified Ouroboros.Consensus.Shelley.Ledger.Query as Consensus +import qualified Ouroboros.Consensus.Shelley.Ledger.Query as Consensus -- ---------------------------------------------------------------------------- @@ -711,7 +713,7 @@ toConsensusQueryShelleyBased sbe = \case creds' = Set.map toShelleyStakeCredential creds QueryLedgerPeerSnapshot -> - Some (consensusQueryInEraInMode era (Consensus.GetCBOR Consensus.GetPeerSnapshot)) + Some (consensusQueryInEraInMode era (Consensus.GetCBOR Consensus.GetBigLedgerPeerSnapshot)) where era = shelleyBasedToCardanoEra sbe @@ -979,7 +981,7 @@ fromConsensusQueryResultShelleyBased _ QueryStakeVoteDelegatees{} q' delegs' = fromConsensusQueryResultShelleyBased _ QueryLedgerPeerSnapshot q' serLedgerPeerSnapshot = case q' of - Consensus.GetCBOR Consensus.GetPeerSnapshot -> serLedgerPeerSnapshot + Consensus.GetCBOR Consensus.GetBigLedgerPeerSnapshot -> serLedgerPeerSnapshot _ -> fromConsensusQueryResultMismatch -- | This should /only/ happen if we messed up the mapping in 'toConsensusQuery'