Skip to content

Commit

Permalink
Update stake.go
Browse files Browse the repository at this point in the history
  • Loading branch information
GooseMatrix authored Dec 26, 2024
1 parent aa21172 commit c716081
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/txsim/stake.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ var _ Sequence = &StakeSequence{}
// to a single validator at a time. TODO: Allow for multiple delegations
type StakeSequence struct {
initialStake int
redelegatePropability int
redelegateProbability int
delegatedTo string
account types.AccAddress
}

func NewStakeSequence(initialStake int) *StakeSequence {
return &StakeSequence{
initialStake: initialStake,
redelegatePropability: 10, // 1 in every 10
redelegateProbability: 10, // 1 in every 10
}
}

Expand Down Expand Up @@ -68,7 +68,7 @@ func (s *StakeSequence) Next(ctx context.Context, querier grpc.ClientConn, rand
}

// occasionally redelegate the initial stake to another validator at random
if rand.Intn(s.redelegatePropability) == 0 {
if rand.Intn(s.redelegateProbability) == 0 {
val, err := getRandomValidator(ctx, querier, rand)
if err != nil {
return Operation{}, err
Expand Down

0 comments on commit c716081

Please sign in to comment.