Skip to content

Commit

Permalink
pre update with master
Browse files Browse the repository at this point in the history
  • Loading branch information
Cmdv committed Mar 4, 2024
1 parent 5465b91 commit 66f8a0a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
10 changes: 6 additions & 4 deletions cardano-db-sync/src/Cardano/DbSync/Era/Shelley/Insert.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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) =>
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 66f8a0a

Please sign in to comment.