cardano-ledger-shelley-test-1.6.0.1: Test helpers from cardano-ledger-shelley exposed to other packages
Safe HaskellSafe-Inferred
LanguageHaskell2010

Test.Cardano.Ledger.Shelley.Rules.IncrementalStake

Synopsis

Documentation

incrStakeComputationTest ∷ ∀ era ledger. (EraGen era, EraStake era, TestingLedger era ledger, ChainProperty era, HasTrace (CHAIN era) (GenEnv MockCrypto era)) ⇒ TestTree Source #

incrStakeComparisonTest ∷ ∀ era. (EraGen era, EraGov era, EraStake era, HasTrace (CHAIN era) (GenEnv MockCrypto era)) ⇒ Proxy era → TestTree Source #

stakeDistr ∷ ∀ era. EraTxOut era ⇒ UTxO era → DState era → PState era → SnapShot Source #

Compute the current Stake Distribution. This was called at the Epoch boundary in the Snap Rule. Now it is called in the tests to see that its incremental analog incrementalStakeDistr agrees.

aggregateUtxoCoinByCredential ∷ ∀ era. EraTxOut era ⇒ Map Ptr (Credential 'Staking) → UTxO era → Map (Credential 'Staking) CoinMap (Credential 'Staking) Coin Source #

Sum up all the Coin for each staking Credential. This function has an incremental analog. See incrementalAggregateUtxoCoinByCredential