From 66f8a0a5acc01549c95a8912d88ffc22f14cab17 Mon Sep 17 00:00:00 2001 From: Cmdv Date: Mon, 4 Mar 2024 09:01:59 +0000 Subject: [PATCH] pre update with master --- .../src/Cardano/DbSync/Era/Shelley/Insert.hs | 10 ++++++---- .../src/Cardano/DbSync/Era/Shelley/Insert/GovAction.hs | 5 ++--- .../src/Cardano/DbSync/Era/Shelley/Insert/Pool.hs | 1 + 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/cardano-db-sync/src/Cardano/DbSync/Era/Shelley/Insert.hs b/cardano-db-sync/src/Cardano/DbSync/Era/Shelley/Insert.hs index 050bc0c49..be526936d 100644 --- a/cardano-db-sync/src/Cardano/DbSync/Era/Shelley/Insert.hs +++ b/cardano-db-sync/src/Cardano/DbSync/Era/Shelley/Insert.hs @@ -34,16 +34,18 @@ import Cardano.DbSync.Ledger.Types (ApplyResult (..)) import Cardano.DbSync.OffChain import Cardano.DbSync.Types import Cardano.DbSync.Util + +import Cardano.DbSync.Era.Shelley.Insert.Certificate (insertPots) +import Cardano.DbSync.Era.Shelley.Insert.GovAction (insertCostModel, insertDrepDistr, updateEnacted) +import Cardano.DbSync.Era.Shelley.Insert.Other (toDouble) +import Cardano.DbSync.Era.Shelley.Insert.Pool (IsPoolMember) import Cardano.Ledger.BaseTypes import qualified Cardano.Ledger.BaseTypes as Ledger import Cardano.Ledger.Conway.Core (DRepVotingThresholds (..), PoolVotingThresholds (..)) import Cardano.Ledger.Conway.Governance import Cardano.Ledger.Keys -import Cardano.DbSync.Era.Shelley.Insert.Certificate (insertPots) -import Cardano.DbSync.Era.Shelley.Insert.GovAction (insertCostModel, insertDrepDistr, updateEnacted) -import Cardano.DbSync.Era.Shelley.Insert.Other (toDouble) -import Cardano.DbSync.Era.Shelley.Insert.Pool (IsPoolMember) import Cardano.Prelude + import Control.Monad.Trans.Control (MonadBaseControl) import Control.Monad.Trans.Except.Extra (newExceptT) import Data.Either.Extra (eitherToMaybe) diff --git a/cardano-db-sync/src/Cardano/DbSync/Era/Shelley/Insert/GovAction.hs b/cardano-db-sync/src/Cardano/DbSync/Era/Shelley/Insert/GovAction.hs index d52511975..4d24de974 100644 --- a/cardano-db-sync/src/Cardano/DbSync/Era/Shelley/Insert/GovAction.hs +++ b/cardano-db-sync/src/Cardano/DbSync/Era/Shelley/Insert/GovAction.hs @@ -47,6 +47,7 @@ import Cardano.Ledger.Conway.Governance import qualified Cardano.Ledger.Credential as Ledger import Cardano.Ledger.DRep (DRepState (..)) import Cardano.Ledger.Keys (KeyRole (..)) +import qualified Cardano.Ledger.Plutus.CostModels as Ledger import Cardano.Ledger.Plutus.Language (Language) import Cardano.Ledger.Shelley.API (Coin (..)) import Cardano.Prelude @@ -59,7 +60,6 @@ import qualified Data.Text.Encoding as Text import Database.Persist.Sql (SqlBackend) import Lens.Micro ((^.)) import Ouroboros.Consensus.Cardano.Block (StandardConway, StandardCrypto) -import qualified Cardano.Ledger.Plutus.CostModels as Ledger insertGovActionProposal :: (MonadIO m, MonadBaseControl IO m) => @@ -213,7 +213,7 @@ insertParamProposal blkId txId pp = do , DB.paramProposalDvtTreasuryWithdrawal = toDouble . dvtTreasuryWithdrawal <$> pppDRepVotingThresholds pp , DB.paramProposalCommitteeMinSize = DbWord64 . fromIntegral <$> pppCommitteeMinSize pp , DB.paramProposalCommitteeMaxTermLength = DbWord64 . fromIntegral . unEpochInterval <$> pppCommitteeMaxTermLength pp - , DB.paramProposalGovActionLifetime = fromIntegral . unEpochInterval <$> pppGovActionLifetime pp + , DB.paramProposalGovActionLifetime = fromIntegral . unEpochInterval <$> pppGovActionLifetime pp , DB.paramProposalGovActionDeposit = DbWord64 . fromIntegral <$> pppGovActionDeposit pp , DB.paramProposalDrepDeposit = DbWord64 . fromIntegral <$> pppDRepDeposit pp , DB.paramProposalDrepActivity = fromIntegral . unEpochInterval <$> pppDRepActivity pp @@ -337,7 +337,6 @@ insertDrepDistr e pSnapshot = do DRepAlwaysNoConfidence -> Nothing DRepCredential cred -> drepExpiry <$> Map.lookup cred (psDRepState pSnapshot) - insertCostModel :: (MonadBaseControl IO m, MonadIO m) => DB.BlockId -> diff --git a/cardano-db-sync/src/Cardano/DbSync/Era/Shelley/Insert/Pool.hs b/cardano-db-sync/src/Cardano/DbSync/Era/Shelley/Insert/Pool.hs index 3dc69c0c7..475762ac3 100644 --- a/cardano-db-sync/src/Cardano/DbSync/Era/Shelley/Insert/Pool.hs +++ b/cardano-db-sync/src/Cardano/DbSync/Era/Shelley/Insert/Pool.hs @@ -41,6 +41,7 @@ import qualified Cardano.Ledger.Keys as Ledger import qualified Cardano.Ledger.PoolParams as PoolP import qualified Cardano.Ledger.Shelley.TxBody as Shelley import Cardano.Prelude + import Control.Monad.Trans.Control (MonadBaseControl) import Database.Persist.Sql (SqlBackend) import Ouroboros.Consensus.Cardano.Block (StandardCrypto)