diff --git a/test/e2e/testnet/testnet.go b/test/e2e/testnet/testnet.go index 71f076c8df..179d2d26eb 100644 --- a/test/e2e/testnet/testnet.go +++ b/test/e2e/testnet/testnet.go @@ -217,6 +217,7 @@ func (t *Testnet) CreateAccount(name string, tokens int64, txsimKeyringDir strin err = t.genesis.AddAccount(genesis.Account{ PubKey: pk, Balance: tokens, + Name: name, }) if err != nil { return nil, err diff --git a/test/util/genesis/genesis.go b/test/util/genesis/genesis.go index f5ffe51084..80a14d11ea 100644 --- a/test/util/genesis/genesis.go +++ b/test/util/genesis/genesis.go @@ -122,6 +122,9 @@ func (g *Genesis) WithKeyringAccounts(accs ...KeyringAccount) *Genesis { // AddAccount adds an existing account to the genesis. func (g *Genesis) AddAccount(account Account) error { + if err := account.ValidateBasic(); err != nil { + return err + } for _, acc := range g.accounts { if bytes.Equal(acc.PubKey.Bytes(), account.PubKey.Bytes()) { return fmt.Errorf("account with pubkey %s already exists", account.PubKey.String())