cardano-ledger-shelley-test-1.5.1.0: 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, TestingLedger era ledger, ChainProperty era, HasTrace (CHAIN era) (GenEnv era)) ⇒ TestTree Source #

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

stakeDistr ∷ ∀ era. EraTxOut era ⇒ UTxO era → DState era → PState era → SnapShot (EraCrypto era) 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 (EraCrypto era)) → UTxO era → Map (Credential 'Staking (EraCrypto era)) CoinMap (Credential 'Staking (EraCrypto era)) Coin Source #

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