Skip to content

Commit 913d283

Browse files
committed
Refactor gov/proposals/v0 namespace definition to include the proposal order
1 parent 0cfbf86 commit 913d283

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

  • libs/cardano-ledger-canonical-state/src/Cardano/Ledger/CanonicalState/Namespace/GovProposals

cabal.project

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ source-repository-package
104104
type: git
105105
location: https://github.com/tweag/cardano-cls.git
106106
subdir: merkle-tree-incremental mempack-scls scls-cbor scls-cardano scls-format scls-core
107-
--sha256: sha256-BoAotLgxMipOIMcZrmlr6EtQzqC5HyEA0ZpK8nvCmJs=
108-
tag: 5161deb34247a51160f2e8d58b6cc2d48044ea2c
107+
--sha256: sha256-fasMDDKpCU9P0PALMOpX4Vutt9EZfmPdMRldEEPiTII=
108+
tag: b607576e149318518c8de7136bcd908551d4bc27
109109

110110
constraints:
111111
-- Happy version 2.2.1 fails to compile haskell-src-exts

libs/cardano-ledger-canonical-state/src/Cardano/Ledger/CanonicalState/Namespace/GovProposals/V0.hs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ import Cardano.SCLS.Versioned (Versioned (..))
4141
import Data.MemPack
4242
import Data.MemPack.ByteOrdered
4343
import Data.Proxy (Proxy (..))
44-
import Data.Word (Word16)
44+
import Data.Word (Word16, Word64)
4545
import GHC.Generics (Generic)
4646

4747
newtype CanonicalGovActionIx = CanonicalGovActionIx Word16
@@ -76,9 +76,7 @@ instance IsKey GovProposalIn where
7676
gaidGovActionIx <- unpackM
7777
return $ GovProposalIn CanonicalGovActionId {..}
7878

79-
-- | Canonical wrapper over gov action state. Because this is on-chain data
80-
-- we create a wrapper for that.
81-
newtype GovProposalOut v = GovProposalOut v
79+
newtype GovProposalOut v = GovProposalOut (Word64, v)
8280
deriving (Eq, Show, Generic)
8381
deriving newtype (ToCanonicalCBOR "gov/proposals/v0")
8482
deriving newtype (FromCanonicalCBOR "gov/proposals/v0")

0 commit comments

Comments
 (0)