Documentation ¶
Index ¶
- func CalculateNewRoundAccountTotals(t *gotesting.T, newRoundDeltas ledgercore.AccountDeltas, ...) (newTotals ledgercore.AccountTotals)
- func GenerateInitState(tb testing.TB, proto protocol.ConsensusVersion, baseAlgoPerAccount int) (genesisInitState ledgercore.InitState, ...)
- func Genesis(naccts int) (ledgercore.InitState, []basics.Address, []*crypto.SignatureSecrets)
- func GenesisWithProto(naccts int, proto protocol.ConsensusVersion) (ledgercore.InitState, []basics.Address, []*crypto.SignatureSecrets)
- func NewTestGenesis() (bookkeeping.GenesisBalances, []basics.Address, []*crypto.SignatureSecrets)
- func RandomAccountData(rewardsLevel uint64) basics.AccountData
- func RandomAccounts(niter int, simpleAccounts bool) map[basics.Address]basics.AccountData
- func RandomAddress() basics.Address
- func RandomDeltas(niter int, base map[basics.Address]basics.AccountData, rewardsLevel uint64) (updates ledgercore.AccountDeltas, totals map[basics.Address]basics.AccountData, ...)
- func RandomDeltasBalanced(niter int, base map[basics.Address]basics.AccountData, rewardsLevel uint64) (updates ledgercore.AccountDeltas, totals map[basics.Address]basics.AccountData)
- func RandomDeltasBalancedFull(niter int, base map[basics.Address]basics.AccountData, rewardsLevel uint64, ...) (updates ledgercore.AccountDeltas, totals map[basics.Address]basics.AccountData, ...)
- func RandomDeltasBalancedImpl(niter int, base map[basics.Address]basics.AccountData, rewardsLevel uint64, ...) (updates ledgercore.AccountDeltas, totals map[basics.Address]basics.AccountData, ...)
- func RandomDeltasFull(niter int, base map[basics.Address]basics.AccountData, rewardsLevel uint64, ...) (updates ledgercore.AccountDeltas, totals map[basics.Address]basics.AccountData, ...)
- func RandomDeltasImpl(niter int, base map[basics.Address]basics.AccountData, rewardsLevel uint64, ...) (updates ledgercore.AccountDeltas, totals map[basics.Address]basics.AccountData, ...)
- func RandomFullAccountData(rewardsLevel, lastCreatableID uint64) (basics.AccountData, uint64)
- func RandomNote() []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateNewRoundAccountTotals ¶
func CalculateNewRoundAccountTotals(t *gotesting.T, newRoundDeltas ledgercore.AccountDeltas, newRoundRewardLevel uint64, newRoundConsensusParams config.ConsensusParams, prevRoundBalances map[basics.Address]basics.AccountData, prevRoundTotals ledgercore.AccountTotals) (newTotals ledgercore.AccountTotals)
CalculateNewRoundAccountTotals calculates the accounts totals for a given round
func GenerateInitState ¶
func GenerateInitState(tb testing.TB, proto protocol.ConsensusVersion, baseAlgoPerAccount int) (genesisInitState ledgercore.InitState, initKeys map[basics.Address]*crypto.SignatureSecrets)
GenerateInitState generates testing init state
func Genesis ¶
func Genesis(naccts int) (ledgercore.InitState, []basics.Address, []*crypto.SignatureSecrets)
Genesis creates a genesis state for naccts accounts using the ConsensusCurrentVersion
func GenesisWithProto ¶
func GenesisWithProto(naccts int, proto protocol.ConsensusVersion) (ledgercore.InitState, []basics.Address, []*crypto.SignatureSecrets)
GenesisWithProto creates a genesis state for naccts accounts using the proto consensus protocol
func NewTestGenesis ¶
func NewTestGenesis() (bookkeeping.GenesisBalances, []basics.Address, []*crypto.SignatureSecrets)
NewTestGenesis creates a bunch of accounts, splits up 10B algos between them and the rewardspool and feesink, and gives out the addresses and secrets it creates to enable tests. For special scenarios, manipulate these return values before using newTestLedger.
func RandomAccountData ¶
func RandomAccountData(rewardsLevel uint64) basics.AccountData
RandomAccountData generates a random AccountData
func RandomAccounts ¶
RandomAccounts generates a random set of accounts map
func RandomDeltas ¶
func RandomDeltas(niter int, base map[basics.Address]basics.AccountData, rewardsLevel uint64) (updates ledgercore.AccountDeltas, totals map[basics.Address]basics.AccountData, imbalance int64)
RandomDeltas generates a random set of accounts delta
func RandomDeltasBalanced ¶
func RandomDeltasBalanced(niter int, base map[basics.Address]basics.AccountData, rewardsLevel uint64) (updates ledgercore.AccountDeltas, totals map[basics.Address]basics.AccountData)
RandomDeltasBalanced generates a random set of accounts delta
func RandomDeltasBalancedFull ¶
func RandomDeltasBalancedFull(niter int, base map[basics.Address]basics.AccountData, rewardsLevel uint64, lastCreatableIDIn uint64) (updates ledgercore.AccountDeltas, totals map[basics.Address]basics.AccountData, lastCreatableID uint64)
RandomDeltasBalancedFull generates a random set of accounts delta
func RandomDeltasBalancedImpl ¶
func RandomDeltasBalancedImpl(niter int, base map[basics.Address]basics.AccountData, rewardsLevel uint64, simple bool, lastCreatableIDIn uint64) (updates ledgercore.AccountDeltas, totals map[basics.Address]basics.AccountData, lastCreatableID uint64)
RandomDeltasBalancedImpl generates a random set of accounts delta
func RandomDeltasFull ¶
func RandomDeltasFull(niter int, base map[basics.Address]basics.AccountData, rewardsLevel uint64, lastCreatableIDIn uint64) (updates ledgercore.AccountDeltas, totals map[basics.Address]basics.AccountData, imbalance int64, lastCreatableID uint64)
RandomDeltasFull generates a random set of accounts delta
func RandomDeltasImpl ¶
func RandomDeltasImpl(niter int, base map[basics.Address]basics.AccountData, rewardsLevel uint64, simple bool, lastCreatableIDIn uint64) (updates ledgercore.AccountDeltas, totals map[basics.Address]basics.AccountData, imbalance int64, lastCreatableID uint64)
RandomDeltasImpl generates a random set of accounts delta
func RandomFullAccountData ¶
func RandomFullAccountData(rewardsLevel, lastCreatableID uint64) (basics.AccountData, uint64)
RandomFullAccountData generates a random AccountData
Types ¶
This section is empty.