Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Commit

Permalink
release: v0.16.1 changes (#1119)
Browse files Browse the repository at this point in the history
* build(deps): bump github.com/stretchr/testify from 1.7.1 to 1.7.2 (#1115)

Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.1 to 1.7.2.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](stretchr/testify@v1.7.1...v1.7.2)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* tests: update consensus params (#1117)

* tests: update consensus params

* fix

* fix(types): account type method (#1118)

* fix account type method

* update changelog

* update changelog

* update changelog

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
  • Loading branch information
3 people authored Jun 8, 2022
1 parent 8fe8072 commit 81f7ab1
Show file tree
Hide file tree
Showing 8 changed files with 120 additions and 13 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ Ref: https://keepachangelog.com/en/1.0.0/

# Changelog

## [v0.16.1] - 2022-06-08

### Bug Fixes

* (types) [tharsis#1118](https://github.com/tharsis/ethermint/pull/1118) Fix `Type()` `Account` method `EmptyCodeHash` comparison

## [v0.16.0] - 2022-06-06

### State Machine Breaking
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ require (
github.com/spf13/cobra v1.4.0
github.com/spf13/viper v1.12.0
github.com/status-im/keycard-go v0.0.0-20200402102358-957c09536969
github.com/stretchr/testify v1.7.1
github.com/stretchr/testify v1.7.2
github.com/tendermint/tendermint v0.34.20-0.20220517115723-e6f071164839
github.com/tendermint/tm-db v0.6.7
github.com/tyler-smith/go-bip39 v1.1.0
Expand Down Expand Up @@ -146,7 +146,7 @@ require (
gopkg.in/ini.v1 v1.66.4 // indirect
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect
gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6 // indirect
gopkg.in/yaml.v3 v3.0.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
nhooyr.io/websocket v1.8.6 // indirect
)

Expand Down
105 changes: 103 additions & 2 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion types/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func (acc *EthAccount) SetCodeHash(codeHash common.Hash) error {

// Type returns the type of Ethereum Account (EOA or Contract)
func (acc EthAccount) Type() int8 {
if bytes.Equal(emptyCodeHash, common.Hex2Bytes(acc.CodeHash)) {
if bytes.Equal(emptyCodeHash, common.HexToHash(acc.CodeHash).Bytes()) {
return AccountTypeEOA
}
return AccountTypeContract
Expand Down
4 changes: 2 additions & 2 deletions types/account_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ func TestAccountTestSuite(t *testing.T) {
}

func (suite *AccountTestSuite) TestAccountType() {
suite.account.CodeHash = common.Bytes2Hex(crypto.Keccak256(nil))
suite.account.CodeHash = common.BytesToHash(crypto.Keccak256(nil)).Hex()
suite.Require().Equal(types.AccountTypeEOA, suite.account.Type())
suite.account.CodeHash = common.Bytes2Hex(crypto.Keccak256([]byte{1, 2, 3}))
suite.account.CodeHash = common.BytesToHash(crypto.Keccak256([]byte{1, 2, 3})).Hex()
suite.Require().Equal(types.AccountTypeContract, suite.account.Type())
}
2 changes: 1 addition & 1 deletion x/evm/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func (suite *EvmTestSuite) DoSetupTest(t require.TestingT) {
abci.RequestInitChain{
ChainId: "ethermint_9000-1",
Validators: []abci.ValidatorUpdate{},
ConsensusParams: simapp.DefaultConsensusParams,
ConsensusParams: app.DefaultConsensusParams,
AppStateBytes: stateBytes,
},
)
Expand Down
2 changes: 1 addition & 1 deletion x/evm/keeper/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func (suite *KeeperTestSuite) DoSetupTest(t require.TestingT) {
abci.RequestInitChain{
ChainId: "ethermint_9000-1",
Validators: []abci.ValidatorUpdate{},
ConsensusParams: simapp.DefaultConsensusParams,
ConsensusParams: app.DefaultConsensusParams,
AppStateBytes: stateBytes,
},
)
Expand Down
8 changes: 4 additions & 4 deletions x/feemarket/keeper/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ var _ = Describe("Ethermint App min gas prices settings: ", func() {
msg banktypes.MsgSend
)

var setupChain = func(cliMinGasPricesStr string) {
setupChain := func(cliMinGasPricesStr string) {
// Initialize the app, so we can use SetMinGasPrices to set the
// validator-specific min-gas-prices setting
db := dbm.NewMemDB()
Expand Down Expand Up @@ -68,15 +68,15 @@ var _ = Describe("Ethermint App min gas prices settings: ", func() {
ChainId: "ethermint_9000-1",
Validators: []abci.ValidatorUpdate{},
AppStateBytes: stateBytes,
ConsensusParams: simapp.DefaultConsensusParams,
ConsensusParams: app.DefaultConsensusParams,
},
)

s.app = newapp
s.SetupApp(false)
}

var setupTest = func(cliMinGasPrices string) {
setupTest := func(cliMinGasPrices string) {
setupChain(cliMinGasPrices)

privKey, address = generateKey()
Expand All @@ -99,7 +99,7 @@ var _ = Describe("Ethermint App min gas prices settings: ", func() {
s.Commit()
}

var setupContext = func(cliMinGasPrice string, minGasPrice sdk.Dec) {
setupContext := func(cliMinGasPrice string, minGasPrice sdk.Dec) {
setupTest(cliMinGasPrice + s.denom)
params := types.DefaultParams()
params.MinGasPrice = minGasPrice
Expand Down

0 comments on commit 81f7ab1

Please sign in to comment.