Safe Haskell | None |
---|---|
Language | Haskell98 |
Shelley.Spec.Ledger.API.ByronTranslation
Contents
Synopsis
- mkInitialShelleyLedgerView :: forall c. ShelleyGenesis (ShelleyEra c) -> LedgerView c
- translateToShelleyLedgerState :: forall c. (Crypto c, ADDRHASH c ~ Blake2b_224) => ShelleyGenesis (ShelleyEra c) -> EpochNo -> ChainValidationState -> NewEpochState (ShelleyEra c)
- translateCompactTxOutByronToShelley :: CompactTxOut -> TxOut (ShelleyEra c)
- translateTxIdByronToShelley :: (Crypto c, ADDRHASH c ~ Blake2b_224) => TxId -> TxId c
Documentation
mkInitialShelleyLedgerView :: forall c. ShelleyGenesis (ShelleyEra c) -> LedgerView c Source #
We construct a LedgerView
using the Shelley genesis config in the same
way as translateToShelleyLedgerState
.
translateToShelleyLedgerState :: forall c. (Crypto c, ADDRHASH c ~ Blake2b_224) => ShelleyGenesis (ShelleyEra c) -> EpochNo -> ChainValidationState -> NewEpochState (ShelleyEra c) Source #
Exported for testing purposes
translateTxIdByronToShelley :: (Crypto c, ADDRHASH c ~ Blake2b_224) => TxId -> TxId c Source #
We use the same hashing algorithm so we can unwrap and rewrap the bytes. We don't care about the type that is hashed, which will differ going from Byron to Shelley, we just use the hashes as IDs.