Documentation ¶
Index ¶
- Constants
- Variables
- type ParticipationHelper
- func (b *ParticipationHelper) AddDefaultBallotVote(eventID participation.EventID) *ParticipationHelper
- func (b *ParticipationHelper) AddParticipation(participation *participation.Participation) *ParticipationHelper
- func (b *ParticipationHelper) AddParticipations(participations []*participation.Participation) *ParticipationHelper
- func (b *ParticipationHelper) Amount(amount uint64) *ParticipationHelper
- func (b *ParticipationHelper) Build() *testsuite.Message
- func (b *ParticipationHelper) Parents(parents hornet.MessageIDs) *ParticipationHelper
- func (b *ParticipationHelper) Send() *SentParticipations
- func (b *ParticipationHelper) UsingOutput(output *utxo.Output) *ParticipationHelper
- func (b *ParticipationHelper) WholeWalletBalance() *ParticipationHelper
- type ParticipationTestEnv
- func (env *ParticipationTestEnv) ActiveParticipationsForEvent(eventID participation.EventID) []*participation.TrackedParticipation
- func (env *ParticipationTestEnv) AssertBallotAnswerStatus(eventID participation.EventID, milestone milestone.Index, ...)
- func (env *ParticipationTestEnv) AssertBallotAnswerStatusAtConfirmedMilestoneIndex(eventID participation.EventID, currentVoteAmount uint64, ...)
- func (env *ParticipationTestEnv) AssertDefaultBallotAnswerStatus(eventID participation.EventID, currentVoteAmount uint64, ...)
- func (env *ParticipationTestEnv) AssertEventParticipationStatus(eventID participation.EventID, activeParticipations int, ...)
- func (env *ParticipationTestEnv) AssertEventsCount(acceptingCount int, countingCount int)
- func (env *ParticipationTestEnv) AssertInvalidParticipation(eventID participation.EventID, sentParticipations *SentParticipations)
- func (env *ParticipationTestEnv) AssertRewardBalance(eventID participation.EventID, address iotago.Address, balance uint64, ...)
- func (env *ParticipationTestEnv) AssertStakingRewardsStatus(eventID participation.EventID, milestone milestone.Index, stakedAmount uint64, ...)
- func (env *ParticipationTestEnv) AssertStakingRewardsStatusAtConfirmedMilestoneIndex(eventID participation.EventID, stakedAmount uint64, rewardedAmount uint64)
- func (env *ParticipationTestEnv) AssertTrackedParticipation(eventID participation.EventID, sentParticipations *SentParticipations, ...)
- func (env *ParticipationTestEnv) AssertWalletBalance(wallet *utils.HDWallet, expectedBalance uint64)
- func (env *ParticipationTestEnv) CancelParticipations(wallet *utils.HDWallet) *testsuite.Message
- func (env *ParticipationTestEnv) Cleanup()
- func (env *ParticipationTestEnv) ConfirmedMilestoneIndex() milestone.Index
- func (env *ParticipationTestEnv) DefaultEvent(commenceMilestoneIndex milestone.Index, startPhaseDuration uint32, ...) *participation.Event
- func (env *ParticipationTestEnv) IssueDefaultBallotVoteAndMilestone(eventID participation.EventID, wallet *utils.HDWallet, balance ...uint64) *SentParticipations
- func (env *ParticipationTestEnv) IssueMilestone(onTips ...hornet.MessageID) (*whiteflag.Confirmation, *whiteflag.ConfirmedMilestoneStats)
- func (env *ParticipationTestEnv) LastMilestoneMessageID() hornet.MessageID
- func (env *ParticipationTestEnv) NewMessageBuilder(optionalIndexation ...string) *testsuite.MessageBuilder
- func (env *ParticipationTestEnv) NewParticipationHelper(wallet *utils.HDWallet) *ParticipationHelper
- func (env *ParticipationTestEnv) ParticipationManager() *participation.ParticipationManager
- func (env *ParticipationTestEnv) PastParticipationsForEvent(eventID participation.EventID) []*participation.TrackedParticipation
- func (env *ParticipationTestEnv) PrintJSON(i interface{})
- func (env *ParticipationTestEnv) SendParticipations(wallet *utils.HDWallet, amount uint64, ...) *SentParticipations
- func (env *ParticipationTestEnv) StoreDefaultEvent(commenceMilestoneIndex milestone.Index, startPhaseDuration uint32, ...) participation.EventID
- func (env *ParticipationTestEnv) Transfer(fromWallet *utils.HDWallet, toWallet *utils.HDWallet, amount uint64) *testsuite.Message
- type SentParticipations
Constants ¶
View Source
const (
ParticipationIndexation = "TEST"
)
Variables ¶
View Source
var ( MinPoWScore = 100.0 BelowMaxDepth = 15 )
Functions ¶
This section is empty.
Types ¶
type ParticipationHelper ¶
type ParticipationHelper struct {
// contains filtered or unexported fields
}
func (*ParticipationHelper) AddDefaultBallotVote ¶
func (b *ParticipationHelper) AddDefaultBallotVote(eventID participation.EventID) *ParticipationHelper
func (*ParticipationHelper) AddParticipation ¶
func (b *ParticipationHelper) AddParticipation(participation *participation.Participation) *ParticipationHelper
func (*ParticipationHelper) AddParticipations ¶
func (b *ParticipationHelper) AddParticipations(participations []*participation.Participation) *ParticipationHelper
func (*ParticipationHelper) Amount ¶
func (b *ParticipationHelper) Amount(amount uint64) *ParticipationHelper
func (*ParticipationHelper) Build ¶
func (b *ParticipationHelper) Build() *testsuite.Message
func (*ParticipationHelper) Parents ¶
func (b *ParticipationHelper) Parents(parents hornet.MessageIDs) *ParticipationHelper
func (*ParticipationHelper) Send ¶
func (b *ParticipationHelper) Send() *SentParticipations
func (*ParticipationHelper) UsingOutput ¶
func (b *ParticipationHelper) UsingOutput(output *utxo.Output) *ParticipationHelper
func (*ParticipationHelper) WholeWalletBalance ¶
func (b *ParticipationHelper) WholeWalletBalance() *ParticipationHelper
type ParticipationTestEnv ¶
type ParticipationTestEnv struct { GenesisWallet *utils.HDWallet Wallet1 *utils.HDWallet Wallet2 *utils.HDWallet Wallet3 *utils.HDWallet Wallet4 *utils.HDWallet // contains filtered or unexported fields }
func NewParticipationTestEnv ¶
func (*ParticipationTestEnv) ActiveParticipationsForEvent ¶
func (env *ParticipationTestEnv) ActiveParticipationsForEvent(eventID participation.EventID) []*participation.TrackedParticipation
func (*ParticipationTestEnv) AssertBallotAnswerStatus ¶
func (env *ParticipationTestEnv) AssertBallotAnswerStatus(eventID participation.EventID, milestone milestone.Index, currentVoteAmount uint64, accumulatedVoteAmount uint64, questionIndex int, answerValue uint8)
func (*ParticipationTestEnv) AssertBallotAnswerStatusAtConfirmedMilestoneIndex ¶
func (env *ParticipationTestEnv) AssertBallotAnswerStatusAtConfirmedMilestoneIndex(eventID participation.EventID, currentVoteAmount uint64, accumulatedVoteAmount uint64, questionIndex int, answerValue uint8)
func (*ParticipationTestEnv) AssertDefaultBallotAnswerStatus ¶
func (env *ParticipationTestEnv) AssertDefaultBallotAnswerStatus(eventID participation.EventID, currentVoteAmount uint64, accumulatedVoteAmount uint64)
func (*ParticipationTestEnv) AssertEventParticipationStatus ¶
func (env *ParticipationTestEnv) AssertEventParticipationStatus(eventID participation.EventID, activeParticipations int, pastParticipations int)
func (*ParticipationTestEnv) AssertEventsCount ¶
func (env *ParticipationTestEnv) AssertEventsCount(acceptingCount int, countingCount int)
func (*ParticipationTestEnv) AssertInvalidParticipation ¶
func (env *ParticipationTestEnv) AssertInvalidParticipation(eventID participation.EventID, sentParticipations *SentParticipations)
func (*ParticipationTestEnv) AssertRewardBalance ¶
func (env *ParticipationTestEnv) AssertRewardBalance(eventID participation.EventID, address iotago.Address, balance uint64, milestoneIndex ...milestone.Index)
func (*ParticipationTestEnv) AssertStakingRewardsStatus ¶
func (env *ParticipationTestEnv) AssertStakingRewardsStatus(eventID participation.EventID, milestone milestone.Index, stakedAmount uint64, rewardedAmount uint64)
func (*ParticipationTestEnv) AssertStakingRewardsStatusAtConfirmedMilestoneIndex ¶
func (env *ParticipationTestEnv) AssertStakingRewardsStatusAtConfirmedMilestoneIndex(eventID participation.EventID, stakedAmount uint64, rewardedAmount uint64)
func (*ParticipationTestEnv) AssertTrackedParticipation ¶
func (env *ParticipationTestEnv) AssertTrackedParticipation(eventID participation.EventID, sentParticipations *SentParticipations, startMilestoneIndex milestone.Index, endMilestoneIndex milestone.Index, amount uint64)
func (*ParticipationTestEnv) AssertWalletBalance ¶ added in v1.2.0
func (env *ParticipationTestEnv) AssertWalletBalance(wallet *utils.HDWallet, expectedBalance uint64)
func (*ParticipationTestEnv) CancelParticipations ¶
func (env *ParticipationTestEnv) CancelParticipations(wallet *utils.HDWallet) *testsuite.Message
func (*ParticipationTestEnv) Cleanup ¶
func (env *ParticipationTestEnv) Cleanup()
func (*ParticipationTestEnv) ConfirmedMilestoneIndex ¶
func (env *ParticipationTestEnv) ConfirmedMilestoneIndex() milestone.Index
func (*ParticipationTestEnv) DefaultEvent ¶
func (env *ParticipationTestEnv) DefaultEvent(commenceMilestoneIndex milestone.Index, startPhaseDuration uint32, holdingDuration uint32) *participation.Event
func (*ParticipationTestEnv) IssueDefaultBallotVoteAndMilestone ¶
func (env *ParticipationTestEnv) IssueDefaultBallotVoteAndMilestone(eventID participation.EventID, wallet *utils.HDWallet, balance ...uint64) *SentParticipations
func (*ParticipationTestEnv) IssueMilestone ¶
func (env *ParticipationTestEnv) IssueMilestone(onTips ...hornet.MessageID) (*whiteflag.Confirmation, *whiteflag.ConfirmedMilestoneStats)
func (*ParticipationTestEnv) LastMilestoneMessageID ¶
func (env *ParticipationTestEnv) LastMilestoneMessageID() hornet.MessageID
func (*ParticipationTestEnv) NewMessageBuilder ¶
func (env *ParticipationTestEnv) NewMessageBuilder(optionalIndexation ...string) *testsuite.MessageBuilder
func (*ParticipationTestEnv) NewParticipationHelper ¶
func (env *ParticipationTestEnv) NewParticipationHelper(wallet *utils.HDWallet) *ParticipationHelper
func (*ParticipationTestEnv) ParticipationManager ¶
func (env *ParticipationTestEnv) ParticipationManager() *participation.ParticipationManager
func (*ParticipationTestEnv) PastParticipationsForEvent ¶
func (env *ParticipationTestEnv) PastParticipationsForEvent(eventID participation.EventID) []*participation.TrackedParticipation
func (*ParticipationTestEnv) PrintJSON ¶
func (env *ParticipationTestEnv) PrintJSON(i interface{})
func (*ParticipationTestEnv) SendParticipations ¶
func (env *ParticipationTestEnv) SendParticipations(wallet *utils.HDWallet, amount uint64, participations []*participation.Participation) *SentParticipations
func (*ParticipationTestEnv) StoreDefaultEvent ¶
func (env *ParticipationTestEnv) StoreDefaultEvent(commenceMilestoneIndex milestone.Index, startPhaseDuration uint32, holdingDuration uint32) participation.EventID
type SentParticipations ¶
type SentParticipations struct {
// contains filtered or unexported fields
}
func (*SentParticipations) Message ¶
func (c *SentParticipations) Message() *testsuite.Message
Click to show internal directories.
Click to hide internal directories.