Documentation ¶
Index ¶
- Constants
- Variables
- func GenesisTimeWithOffsetBySlots(slots iotago.SlotIndex, slotDurationInSeconds uint8) int64
- func WithAccounts(accounts ...snapshotcreator.AccountDetails) options.Option[TestSuite]
- func WithActiveRootBlocks(blocks []*blocks.Block) options.Option[NodeState]
- func WithChainManagerIsSolid() options.Option[NodeState]
- func WithEqualStoredCommitmentAtIndex(slot iotago.SlotIndex) options.Option[NodeState]
- func WithEvictedSlot(slot iotago.SlotIndex) options.Option[NodeState]
- func WithLatestCommitment(commitment *iotago.Commitment) options.Option[NodeState]
- func WithLatestCommitmentCumulativeWeight(cumulativeWeight uint64) options.Option[NodeState]
- func WithLatestCommitmentSlotIndex(slot iotago.SlotIndex) options.Option[NodeState]
- func WithLatestFinalizedSlot(slot iotago.SlotIndex) options.Option[NodeState]
- func WithLogger(logger log.Logger) options.Option[TestSuite]
- func WithMainChainID(chainID iotago.CommitmentID) options.Option[NodeState]
- func WithProtocolParameters(protocolParameters iotago.ProtocolParameters) options.Option[NodeState]
- func WithProtocolParametersOptions(protocolParameterOptions ...options.Option[iotago.V3ProtocolParameters]) options.Option[TestSuite]
- func WithSnapshotImported(snapshotImported bool) options.Option[NodeState]
- func WithSnapshotOptions(snapshotOptions ...options.Option[snapshotcreator.Options]) options.Option[TestSuite]
- func WithStorageCommitments(commitments []*iotago.Commitment) options.Option[NodeState]
- func WithStorageRootBlocks(blocks []*blocks.Block) options.Option[NodeState]
- func WithSybilProtectionCandidates(epoch iotago.EpochIndex, candidates []iotago.AccountID) options.Option[NodeState]
- func WithSybilProtectionCommittee(epoch iotago.EpochIndex, committee []iotago.AccountID) options.Option[NodeState]
- func WithSybilProtectionOnlineCommittee(committee ...account.SeatIndex) options.Option[NodeState]
- func WithTick(tick time.Duration) options.Option[TestSuite]
- func WithWaitFor(waitFor time.Duration) options.Option[TestSuite]
- func WithWalletAmount(amount iotago.BaseToken) options.Option[WalletOptions]
- func WithWalletBlockIssuanceCredits(blockIssuanceCredits iotago.BlockIssuanceCredits) options.Option[WalletOptions]
- func WithWalletFixedCost(fixedCost iotago.Mana) options.Option[WalletOptions]
- type NodeState
- type TestSuite
- func (t *TestSuite) AccountOutput(alias string) *mock.OutputData
- func (t *TestSuite) AccountsOfNodes(names ...string) []iotago.AccountID
- func (t *TestSuite) AddDefaultWallet(node *mock.Node, walletOpts ...options.Option[WalletOptions]) *mock.Wallet
- func (t *TestSuite) AddGenesisAccount(accountDetails snapshotcreator.AccountDetails)
- func (t *TestSuite) AddGenesisWallet(name string, node *mock.Node, walletOpts ...options.Option[WalletOptions]) *mock.Wallet
- func (t *TestSuite) AddNode(name string, walletOpts ...options.Option[WalletOptions]) *mock.Node
- func (t *TestSuite) AddNodeToPartition(name string, partition string, walletOpts ...options.Option[WalletOptions]) *mock.Node
- func (t *TestSuite) AddValidatorNode(name string, walletOpts ...options.Option[WalletOptions]) *mock.Node
- func (t *TestSuite) AddValidatorNodeToPartition(name string, partition string, walletOpts ...options.Option[WalletOptions]) *mock.Node
- func (t *TestSuite) AddWallet(name string, node *mock.Node, accountID iotago.AccountID, ...) *mock.Wallet
- func (t *TestSuite) AssertAccountData(accountData *accounts.AccountData, nodes ...*mock.Node)
- func (t *TestSuite) AssertAccountDiff(accountID iotago.AccountID, index iotago.SlotIndex, ...)
- func (t *TestSuite) AssertAccountStake(accountID iotago.AccountID, validatorStake iotago.BaseToken, ...)
- func (t *TestSuite) AssertActiveRootBlocks(expectedBlocks []*blocks.Block, nodes ...*mock.Node)
- func (t *TestSuite) AssertAttestationsForSlot(slot iotago.SlotIndex, blocks []*blocks.Block, nodes ...*mock.Node)
- func (t *TestSuite) AssertBlock(block *blocks.Block, client mock.Client) *iotago.Block
- func (t *TestSuite) AssertBlockFiltered(blocks []*blocks.Block, reason error, node *mock.Node)
- func (t *TestSuite) AssertBlocksExist(blocks []*blocks.Block, expectedExist bool, clients ...mock.Client)
- func (t *TestSuite) AssertBlocksInCacheAccepted(expectedBlocks []*blocks.Block, expectedAccepted bool, nodes ...*mock.Node)
- func (t *TestSuite) AssertBlocksInCacheBooked(expectedBlocks []*blocks.Block, expectedBooked bool, nodes ...*mock.Node)
- func (t *TestSuite) AssertBlocksInCacheConfirmed(expectedBlocks []*blocks.Block, expectedConfirmed bool, nodes ...*mock.Node)
- func (t *TestSuite) AssertBlocksInCacheConflicts(blockConflicts map[*blocks.Block][]string, nodes ...*mock.Node)
- func (t *TestSuite) AssertBlocksInCacheInvalid(expectedBlocks []*blocks.Block, expectedInvalid bool, nodes ...*mock.Node)
- func (t *TestSuite) AssertBlocksInCachePreAccepted(expectedBlocks []*blocks.Block, expectedPreAccepted bool, nodes ...*mock.Node)
- func (t *TestSuite) AssertBlocksInCachePreConfirmed(expectedBlocks []*blocks.Block, expectedPreConfirmed bool, nodes ...*mock.Node)
- func (t *TestSuite) AssertBlocksInCacheRootBlock(expectedBlocks []*blocks.Block, expectedRootBlock bool, nodes ...*mock.Node)
- func (t *TestSuite) AssertBlocksInCacheScheduled(expectedBlocks []*blocks.Block, expectedScheduled bool, nodes ...*mock.Node)
- func (t *TestSuite) AssertCandidateEngineActivatedCount(expectedCount int, nodes ...*mock.Node)
- func (t *TestSuite) AssertCommitmentSlotIndexExists(slot iotago.SlotIndex, clients ...mock.Client)
- func (t *TestSuite) AssertCommitmentsAndChainsEvicted(expectedEvictedSlot iotago.SlotIndex, nodes ...*mock.Node)
- func (t *TestSuite) AssertCommitmentsOnChain(expectedCommitments []*model.Commitment, expectedChainID iotago.CommitmentID, ...)
- func (t *TestSuite) AssertCommitmentsOnChainAndChainHasCommitments(expectedCommitments []*model.Commitment, chainID iotago.CommitmentID, ...)
- func (t *TestSuite) AssertCommitmentsOnEvictedChain(expectedCommitments []*model.Commitment, expectedOrphaned bool, ...)
- func (t *TestSuite) AssertEpochVersions(epochVersions map[iotago.Version]iotago.EpochIndex, nodes ...*mock.Node)
- func (t *TestSuite) AssertEqualStoredCommitmentAtIndex(index iotago.SlotIndex, nodes ...*mock.Node)
- func (t *TestSuite) AssertEvictedSlot(expectedIndex iotago.SlotIndex, nodes ...*mock.Node)
- func (t *TestSuite) AssertForkDetectedCount(expectedCount int, nodes ...*mock.Node)
- func (t *TestSuite) AssertLatestCommitment(commitment *iotago.Commitment, nodes ...*mock.Node)
- func (t *TestSuite) AssertLatestCommitmentCumulativeWeight(cw uint64, nodes ...*mock.Node)
- func (t *TestSuite) AssertLatestCommitmentSlotIndex(slot iotago.SlotIndex, nodes ...*mock.Node)
- func (t *TestSuite) AssertLatestEngineCommitmentOnMainChain(nodes ...*mock.Node)
- func (t *TestSuite) AssertLatestFinalizedSlot(slot iotago.SlotIndex, nodes ...*mock.Node)
- func (t *TestSuite) AssertMainChain(expectedChainID iotago.CommitmentID, nodes ...*mock.Node)
- func (t *TestSuite) AssertMainEngineSwitchedCount(expectedCount int, nodes ...*mock.Node)
- func (t *TestSuite) AssertNodeState(nodes []*mock.Node, opts ...options.Option[NodeState])
- func (t *TestSuite) AssertProtocolParameters(parameters iotago.ProtocolParameters, nodes ...*mock.Node)
- func (t *TestSuite) AssertPrunedUntil(expectedStorage *types.Tuple[int, bool], ...)
- func (t *TestSuite) AssertReelectedCommitteeSeatIndices(prevEpoch iotago.EpochIndex, newEpoch iotago.EpochIndex, nodes ...*mock.Node)
- func (t *TestSuite) AssertRetainerBlocksState(expectedBlocks []*blocks.Block, expectedState api.BlockState, ...)
- func (t *TestSuite) AssertSnapshotImported(imported bool, nodes ...*mock.Node)
- func (t *TestSuite) AssertSpendersInCacheAcceptanceState(expectedConflictAliases []string, expectedState acceptance.State, ...)
- func (t *TestSuite) AssertStorageAccountDiffs(slot iotago.SlotIndex, accountDiffs map[iotago.AccountID]*model.AccountDiff, ...)
- func (t *TestSuite) AssertStorageBlock(block *model.Block, node *mock.Node)
- func (t *TestSuite) AssertStorageBlockExist(block *model.Block, expectedExist bool, node *mock.Node)
- func (t *TestSuite) AssertStorageCommitmentBlockAccepted(slot iotago.SlotIndex, blockID iotago.BlockID, expectedContains bool, ...)
- func (t *TestSuite) AssertStorageCommitmentBlocks(slot iotago.SlotIndex, ...)
- func (t *TestSuite) AssertStorageCommitmentTransactionAccepted(slot iotago.SlotIndex, transactionID iotago.TransactionID, ...)
- func (t *TestSuite) AssertStorageCommitmentTransactions(slot iotago.SlotIndex, expectedTransactionIDs iotago.TransactionIDs, ...)
- func (t *TestSuite) AssertStorageCommitments(commitments []*iotago.Commitment, nodes ...*mock.Node)
- func (t *TestSuite) AssertStorageRootBlocks(blocks []*blocks.Block, nodes ...*mock.Node)
- func (t *TestSuite) AssertStrongTips(expectedBlocks []*blocks.Block, nodes ...*mock.Node)
- func (t *TestSuite) AssertSybilProtectionCandidates(epoch iotago.EpochIndex, expectedAccounts []iotago.AccountID, ...)
- func (t *TestSuite) AssertSybilProtectionCommittee(epoch iotago.EpochIndex, expectedAccounts []iotago.AccountID, ...)
- func (t *TestSuite) AssertSybilProtectionOnlineCommittee(expectedSeats []account.SeatIndex, nodes ...*mock.Node)
- func (t *TestSuite) AssertSybilProtectionRegisteredValidators(epoch iotago.EpochIndex, expectedAccounts []string, nodes ...*mock.Node)
- func (t *TestSuite) AssertTransaction(transaction *iotago.Transaction, node *mock.Node) mempool.Transaction
- func (t *TestSuite) AssertTransactionFailure(signedTxID iotago.SignedTransactionID, txFailureReason error, ...)
- func (t *TestSuite) AssertTransactionInCacheConflicts(transactionConflicts map[*iotago.Transaction][]string, nodes ...*mock.Node)
- func (t *TestSuite) AssertTransactionsExist(transactions []*iotago.Transaction, expectedExist bool, nodes ...*mock.Node)
- func (t *TestSuite) AssertTransactionsInCacheAccepted(expectedTransactions []*iotago.Transaction, expectedFlag bool, ...)
- func (t *TestSuite) AssertTransactionsInCacheBooked(expectedTransactions []*iotago.Transaction, expectedFlag bool, ...)
- func (t *TestSuite) AssertTransactionsInCacheInvalid(expectedTransactions []*iotago.Transaction, expectedFlag bool, ...)
- func (t *TestSuite) AssertTransactionsInCacheOrphaned(expectedTransactions []*iotago.Transaction, expectedFlag bool, ...)
- func (t *TestSuite) AssertTransactionsInCachePending(expectedTransactions []*iotago.Transaction, expectedFlag bool, ...)
- func (t *TestSuite) AssertTransactionsInCacheRejected(expectedTransactions []*iotago.Transaction, expectedFlag bool, ...)
- func (t *TestSuite) AssertUniqueCommitmentChain(nodes ...*mock.Node)
- func (t *TestSuite) AssertVersionAndProtocolParameters(versionsAndProtocolParameters map[iotago.Version]iotago.ProtocolParameters, ...)
- func (t *TestSuite) AssertVersionAndProtocolParametersHashes(versionsAndProtocolParametersHashes map[iotago.Version]iotago.Identifier, ...)
- func (t *TestSuite) Block(alias string) *blocks.Block
- func (t *TestSuite) BlockID(alias string) iotago.BlockID
- func (t *TestSuite) BlockIDs(aliases ...string) []iotago.BlockID
- func (t *TestSuite) BlockIDsWithPrefix(prefix string) []iotago.BlockID
- func (t *TestSuite) BlockIssuersForNodes(nodes []*mock.Node) []*mock.BlockIssuer
- func (t *TestSuite) Blocks(aliases ...string) []*blocks.Block
- func (t *TestSuite) BlocksWithPrefix(prefix string) []*blocks.Block
- func (t *TestSuite) BlocksWithPrefixes(prefixes ...string) []*blocks.Block
- func (t *TestSuite) BlocksWithSuffix(suffix string) []*blocks.Block
- func (t *TestSuite) BlocksWithSuffixes(suffixes ...string) []*blocks.Block
- func (t *TestSuite) ClientsForNodes(nodes ...*mock.Node) []mock.Client
- func (t *TestSuite) CommitUntilSlot(slot iotago.SlotIndex, parents ...iotago.BlockID) []iotago.BlockID
- func (t *TestSuite) CommitmentOfMainEngine(node *mock.Node, slot iotago.SlotIndex) *model.Commitment
- func (t *TestSuite) CommitmentsOfMainEngine(node *mock.Node, start, end iotago.SlotIndex) []*model.Commitment
- func (t *TestSuite) CurrentSlot() iotago.SlotIndex
- func (t *TestSuite) DefaultWallet() *mock.Wallet
- func (t *TestSuite) Eventually(condition func() error)
- func (t *TestSuite) IssueBasicBlockWithOptions(blockName string, wallet *mock.Wallet, payload iotago.Payload, ...) (*blocks.Block, error)
- func (t *TestSuite) IssueBlocksAtEpoch(prefix string, epoch iotago.EpochIndex, rowsPerSlot int, ...) (allBlocksIssued []*blocks.Block, lastBlockRow []*blocks.Block)
- func (t *TestSuite) IssueBlocksAtSlots(prefix string, slots []iotago.SlotIndex, rowsPerSlot int, ...) (allBlocksIssued []*blocks.Block, lastBlockRow []*blocks.Block)
- func (t *TestSuite) IssueCandidacyAnnouncementInSlot(alias string, slot iotago.SlotIndex, parentsPrefixAlias string, ...) (*blocks.Block, error)
- func (t *TestSuite) IssueExistingBlock(blockName string, wallet *mock.Wallet) error
- func (t *TestSuite) IssueValidationBlockWithHeaderOptions(blockName string, node *mock.Node, ...) (*blocks.Block, error)
- func (t *TestSuite) IssueValidationBlockWithOptions(blockName string, node *mock.Node, ...) (*blocks.Block, error)
- func (t *TestSuite) MergePartitionsToMain(partitions ...string)
- func (t *TestSuite) Node(name string) *mock.Node
- func (t *TestSuite) Nodes(names ...string) []*mock.Node
- func (t *TestSuite) RegisterBlock(blockName string, block *blocks.Block)
- func (t *TestSuite) RemoveNode(name string)
- func (t *TestSuite) Run(failOnBlockFiltered bool, ...)
- func (t *TestSuite) SeatOfNodes(slot iotago.SlotIndex, names ...string) []account.SeatIndex
- func (t *TestSuite) SetAutomaticTransactionIssuingCounters(partition string, newValue int)
- func (t *TestSuite) SetCurrentSlot(slot iotago.SlotIndex)
- func (t *TestSuite) Shutdown()
- func (t *TestSuite) SlotsForEpoch(epoch iotago.EpochIndex) []iotago.SlotIndex
- func (t *TestSuite) SplitIntoPartitions(partitions map[string][]*mock.Node)
- func (t *TestSuite) Validators() []*mock.Node
- func (t *TestSuite) Wait(nodes ...*mock.Node)
- func (t *TestSuite) WaitWithDelay(delay time.Duration, nodes ...*mock.Node)
- func (t *TestSuite) Wallet(name string) *mock.Wallet
- type WalletOptions
Constants ¶
const (
DefaultWallet = "defaultWallet"
)
Variables ¶
var ( DefaultSlotDurationInSeconds uint8 = defaultProtocolParams.SlotDurationInSeconds() DefaultSlotsPerEpochExponent uint8 = defaultProtocolParams.SlotsPerEpochExponent() DefaultLivenessThresholdLowerBoundInSeconds uint16 = uint16(defaultProtocolParams.LivenessThresholdLowerBound().Seconds()) DefaultLivenessThresholdUpperBoundInSeconds uint16 = uint16(defaultProtocolParams.LivenessThresholdUpperBound().Seconds()) DefaultMinCommittableAge iotago.SlotIndex = defaultProtocolParams.MinCommittableAge() DefaultMaxCommittableAge iotago.SlotIndex = defaultProtocolParams.MaxCommittableAge() DefaultEpochNearingThreshold iotago.SlotIndex = defaultProtocolParams.EpochNearingThreshold() DefaultMinReferenceManaCost iotago.Mana = defaultProtocolParams.CongestionControlParameters().MinReferenceManaCost DefaultRMCIncrease iotago.Mana = defaultProtocolParams.CongestionControlParameters().Increase DefaultRMCDecrease iotago.Mana = defaultProtocolParams.CongestionControlParameters().Decrease DefaultRMCIncreaseThreshold iotago.WorkScore = defaultProtocolParams.CongestionControlParameters().IncreaseThreshold DefaultRMCDecreaseThreshold iotago.WorkScore = defaultProtocolParams.CongestionControlParameters().DecreaseThreshold DefaultSchedulerRate iotago.WorkScore = defaultProtocolParams.CongestionControlParameters().SchedulerRate DefaultMaxBufferSize uint32 = defaultProtocolParams.CongestionControlParameters().MaxBufferSize DefaultMaxValBufferSize uint32 = defaultProtocolParams.CongestionControlParameters().MaxValidationBufferSize )
Functions ¶
func WithAccounts ¶
func WithAccounts(accounts ...snapshotcreator.AccountDetails) options.Option[TestSuite]
func WithActiveRootBlocks ¶
func WithChainManagerIsSolid ¶
func WithLatestCommitment ¶
func WithLatestCommitment(commitment *iotago.Commitment) options.Option[NodeState]
func WithLatestFinalizedSlot ¶
func WithMainChainID ¶
func WithMainChainID(chainID iotago.CommitmentID) options.Option[NodeState]
func WithProtocolParameters ¶
func WithProtocolParameters(protocolParameters iotago.ProtocolParameters) options.Option[NodeState]
func WithSnapshotImported ¶
func WithSnapshotOptions ¶
func WithStorageCommitments ¶
func WithStorageCommitments(commitments []*iotago.Commitment) options.Option[NodeState]
func WithStorageRootBlocks ¶
func WithWalletAmount ¶
func WithWalletAmount(amount iotago.BaseToken) options.Option[WalletOptions]
func WithWalletBlockIssuanceCredits ¶
func WithWalletBlockIssuanceCredits(blockIssuanceCredits iotago.BlockIssuanceCredits) options.Option[WalletOptions]
func WithWalletFixedCost ¶
func WithWalletFixedCost(fixedCost iotago.Mana) options.Option[WalletOptions]
Types ¶
type TestSuite ¶
type TestSuite struct { Testing *testing.T Directory *utils.Directory API iotago.API ProtocolParameterOptions []options.Option[iotago.V3ProtocolParameters] // contains filtered or unexported fields }
func (*TestSuite) AccountOutput ¶
func (t *TestSuite) AccountOutput(alias string) *mock.OutputData
func (*TestSuite) AccountsOfNodes ¶
func (*TestSuite) AddDefaultWallet ¶
func (*TestSuite) AddGenesisAccount ¶
func (t *TestSuite) AddGenesisAccount(accountDetails snapshotcreator.AccountDetails)
AddGenesisAccount adds an account the test suite in the genesis snapshot.
func (*TestSuite) AddGenesisWallet ¶
func (t *TestSuite) AddGenesisWallet(name string, node *mock.Node, walletOpts ...options.Option[WalletOptions]) *mock.Wallet
AddGenesisWallet adds a wallet to the test suite with a block issuer in the genesis snapshot and access to the genesis seed. If no block issuance credits are provided, the wallet will be assigned half of the maximum block issuance credits.
func (*TestSuite) AddNodeToPartition ¶
func (*TestSuite) AddValidatorNode ¶
func (*TestSuite) AddValidatorNodeToPartition ¶
func (*TestSuite) AssertAccountData ¶
func (t *TestSuite) AssertAccountData(accountData *accounts.AccountData, nodes ...*mock.Node)
func (*TestSuite) AssertAccountDiff ¶
func (*TestSuite) AssertAccountStake ¶
func (*TestSuite) AssertActiveRootBlocks ¶
func (*TestSuite) AssertAttestationsForSlot ¶
func (*TestSuite) AssertBlock ¶
func (*TestSuite) AssertBlockFiltered ¶
func (*TestSuite) AssertBlocksExist ¶
func (*TestSuite) AssertBlocksInCacheAccepted ¶
func (*TestSuite) AssertBlocksInCacheBooked ¶
func (*TestSuite) AssertBlocksInCacheConfirmed ¶
func (*TestSuite) AssertBlocksInCacheConflicts ¶
func (*TestSuite) AssertBlocksInCacheInvalid ¶
func (*TestSuite) AssertBlocksInCachePreAccepted ¶
func (*TestSuite) AssertBlocksInCachePreConfirmed ¶
func (*TestSuite) AssertBlocksInCacheRootBlock ¶
func (*TestSuite) AssertBlocksInCacheScheduled ¶
func (*TestSuite) AssertCandidateEngineActivatedCount ¶
func (*TestSuite) AssertCommitmentSlotIndexExists ¶
func (*TestSuite) AssertCommitmentsAndChainsEvicted ¶
func (*TestSuite) AssertCommitmentsOnChain ¶
func (t *TestSuite) AssertCommitmentsOnChain(expectedCommitments []*model.Commitment, expectedChainID iotago.CommitmentID, nodes ...*mock.Node)
func (*TestSuite) AssertCommitmentsOnChainAndChainHasCommitments ¶
func (t *TestSuite) AssertCommitmentsOnChainAndChainHasCommitments(expectedCommitments []*model.Commitment, chainID iotago.CommitmentID, nodes ...*mock.Node)
func (*TestSuite) AssertCommitmentsOnEvictedChain ¶
func (*TestSuite) AssertEpochVersions ¶
func (*TestSuite) AssertEqualStoredCommitmentAtIndex ¶
func (*TestSuite) AssertEvictedSlot ¶
func (*TestSuite) AssertForkDetectedCount ¶
func (*TestSuite) AssertLatestCommitment ¶
func (t *TestSuite) AssertLatestCommitment(commitment *iotago.Commitment, nodes ...*mock.Node)
func (*TestSuite) AssertLatestCommitmentCumulativeWeight ¶
func (*TestSuite) AssertLatestCommitmentSlotIndex ¶
func (*TestSuite) AssertLatestEngineCommitmentOnMainChain ¶
func (*TestSuite) AssertLatestFinalizedSlot ¶
func (*TestSuite) AssertMainChain ¶
func (t *TestSuite) AssertMainChain(expectedChainID iotago.CommitmentID, nodes ...*mock.Node)
func (*TestSuite) AssertMainEngineSwitchedCount ¶
func (*TestSuite) AssertNodeState ¶
func (*TestSuite) AssertProtocolParameters ¶
func (t *TestSuite) AssertProtocolParameters(parameters iotago.ProtocolParameters, nodes ...*mock.Node)
func (*TestSuite) AssertPrunedUntil ¶
func (*TestSuite) AssertReelectedCommitteeSeatIndices ¶
func (t *TestSuite) AssertReelectedCommitteeSeatIndices(prevEpoch iotago.EpochIndex, newEpoch iotago.EpochIndex, nodes ...*mock.Node)
func (*TestSuite) AssertRetainerBlocksState ¶
func (*TestSuite) AssertSnapshotImported ¶
func (*TestSuite) AssertSpendersInCacheAcceptanceState ¶
func (*TestSuite) AssertStorageAccountDiffs ¶
func (*TestSuite) AssertStorageBlock ¶
func (*TestSuite) AssertStorageBlockExist ¶
func (*TestSuite) AssertStorageCommitmentBlockAccepted ¶
func (t *TestSuite) AssertStorageCommitmentBlockAccepted(slot iotago.SlotIndex, blockID iotago.BlockID, expectedContains bool, nodes ...*mock.Node)
AssertStorageCommitmentBlockAccepted asserts that the given block ID has the expected containment status in the commitment identified by the given slot.
func (*TestSuite) AssertStorageCommitmentBlocks ¶
func (*TestSuite) AssertStorageCommitmentTransactionAccepted ¶
func (t *TestSuite) AssertStorageCommitmentTransactionAccepted(slot iotago.SlotIndex, transactionID iotago.TransactionID, expectedContains bool, nodes ...*mock.Node)
AssertStorageCommitmentTransactionAccepted asserts that the given transaction ID has the expected containment status in the commitment identified by the given slot.
func (*TestSuite) AssertStorageCommitmentTransactions ¶
func (t *TestSuite) AssertStorageCommitmentTransactions(slot iotago.SlotIndex, expectedTransactionIDs iotago.TransactionIDs, nodes ...*mock.Node)
AssertStorageCommitmentTransactions asserts that the given transactionIDs were included in the commitment identified by the given slot.
func (*TestSuite) AssertStorageCommitments ¶
func (t *TestSuite) AssertStorageCommitments(commitments []*iotago.Commitment, nodes ...*mock.Node)
func (*TestSuite) AssertStorageRootBlocks ¶
func (*TestSuite) AssertStrongTips ¶
func (*TestSuite) AssertSybilProtectionCandidates ¶
func (*TestSuite) AssertSybilProtectionCommittee ¶
func (*TestSuite) AssertSybilProtectionOnlineCommittee ¶
func (*TestSuite) AssertSybilProtectionRegisteredValidators ¶
func (*TestSuite) AssertTransaction ¶
func (t *TestSuite) AssertTransaction(transaction *iotago.Transaction, node *mock.Node) mempool.Transaction
func (*TestSuite) AssertTransactionFailure ¶
func (*TestSuite) AssertTransactionInCacheConflicts ¶
func (*TestSuite) AssertTransactionsExist ¶
func (*TestSuite) AssertTransactionsInCacheAccepted ¶
func (*TestSuite) AssertTransactionsInCacheBooked ¶
func (*TestSuite) AssertTransactionsInCacheInvalid ¶
func (*TestSuite) AssertTransactionsInCacheOrphaned ¶
func (*TestSuite) AssertTransactionsInCachePending ¶
func (*TestSuite) AssertTransactionsInCacheRejected ¶
func (*TestSuite) AssertUniqueCommitmentChain ¶
func (*TestSuite) AssertVersionAndProtocolParameters ¶
func (*TestSuite) AssertVersionAndProtocolParametersHashes ¶
func (*TestSuite) Block ¶
Block returns the block with the given alias. Important to note that this blocks.Block is a placeholder and is thus not the same as the blocks.Block that is created by a node.
func (*TestSuite) BlockIDsWithPrefix ¶
func (*TestSuite) BlockIssuersForNodes ¶
func (t *TestSuite) BlockIssuersForNodes(nodes []*mock.Node) []*mock.BlockIssuer
BlockIssersForNodes returns a map of block issuers for each node. If the node is a validator, its block issuer is the validation block issuer. Else, it is the block issuer for the test suite.
func (*TestSuite) BlocksWithPrefix ¶
func (*TestSuite) BlocksWithPrefixes ¶
func (*TestSuite) BlocksWithSuffix ¶
func (*TestSuite) BlocksWithSuffixes ¶
func (*TestSuite) ClientsForNodes ¶
func (*TestSuite) CommitUntilSlot ¶
func (*TestSuite) CommitmentOfMainEngine ¶
func (*TestSuite) CommitmentsOfMainEngine ¶
func (*TestSuite) CurrentSlot ¶
func (*TestSuite) DefaultWallet ¶
func (*TestSuite) Eventually ¶
Eventually asserts that given condition will be met in opts.waitFor time, periodically checking target function each opts.tick.
assert.Eventually(t, func() bool { return true; }, time.Second, 10*time.Millisecond)
func (*TestSuite) IssueBasicBlockWithOptions ¶
func (*TestSuite) IssueBlocksAtEpoch ¶
func (*TestSuite) IssueBlocksAtSlots ¶
func (*TestSuite) IssueCandidacyAnnouncementInSlot ¶
func (*TestSuite) IssueExistingBlock ¶
func (*TestSuite) IssueValidationBlockWithHeaderOptions ¶
func (*TestSuite) IssueValidationBlockWithOptions ¶
func (*TestSuite) MergePartitionsToMain ¶
func (*TestSuite) RegisterBlock ¶
func (*TestSuite) RemoveNode ¶
func (*TestSuite) SeatOfNodes ¶
func (*TestSuite) SetAutomaticTransactionIssuingCounters ¶
func (*TestSuite) SetCurrentSlot ¶
Update the global time of the test suite and all nodes and wallets.
func (*TestSuite) SlotsForEpoch ¶
func (t *TestSuite) SlotsForEpoch(epoch iotago.EpochIndex) []iotago.SlotIndex
func (*TestSuite) SplitIntoPartitions ¶
func (*TestSuite) Validators ¶
func (*TestSuite) WaitWithDelay ¶
type WalletOptions ¶
Source Files ¶
- accounts.go
- attestations.go
- blocks.go
- blocks_retainer.go
- chains.go
- eviction.go
- fork.go
- node_state.go
- spenders.go
- storage_accountdiffs.go
- storage_blocks.go
- storage_commitments.go
- storage_prunable.go
- storage_rootblocks.go
- storage_settings.go
- sybilprotection.go
- testsuite.go
- testsuite_issue_blocks.go
- testsuite_options.go
- tips.go
- transactions.go
- upgrades.go