upgrade to ethermint v0.21.0 #99

Closed
0xmuralik wants to merge 384 commits from murali/update-fork into main
2 changed files with 6 additions and 6 deletions
Showing only changes of commit 285c7c47d7 - Show all commits

View File

@ -2,11 +2,10 @@ package types
import (
"fmt"
"strings"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/ethereum/go-ethereum/common"
"github.com/tharsis/ethermint/types"
)
// Storage represents the account Storage map as a slice of single key value
@ -49,11 +48,12 @@ func (s Storage) Copy() Storage {
}
// Validate performs a basic validation of the State fields.
func (s State) Validate() error {
if types.IsEmptyHash(s.Key) {
return sdkerrors.Wrap(ErrInvalidState, "state key hash cannot be empty")
}
// NOTE: state value can be empty
func (s State) Validate() error {
if strings.TrimSpace(s.Key) == "" {
return sdkerrors.Wrap(ErrInvalidState, "state key hash cannot be blank")
}
return nil
}

View File

@ -23,7 +23,7 @@ func TestStorageValidate(t *testing.T) {
{
"empty storage key bytes",
Storage{
{Key: common.Hash{}.String()},
{Key: ""},
},
false,
},