Skip to content

Commit

Permalink
fix: allow module accounts as delegators
Browse files Browse the repository at this point in the history
  • Loading branch information
javiersuweijie committed Mar 17, 2023
1 parent 1f20683 commit 41328e5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions x/staking/simulation/operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -537,9 +537,8 @@ func SimulateMsgBeginRedelegate(ak types.AccountKeeper, bk types.BankKeeper, k k
}
}

// if simaccount.PrivKey == nil, delegation address does not exist in accs. Return error
if simAccount.PrivKey == nil {
return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgBeginRedelegate, "account private key is nil"), nil, fmt.Errorf("delegation addr: %s does not exist in simulation accounts", delAddr)
return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgBeginRedelegate, "account private key is nil"), nil, nil
}

account := ak.GetAccount(ctx, delAddr)
Expand Down

0 comments on commit 41328e5

Please sign in to comment.