Skip to content

Commit

Permalink
PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
skosito committed Mar 5, 2024
1 parent 4acee18 commit 34d22f7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion zetaclient/config/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func (c *Config) GetKeyringBackend() KeyringBackend {
return c.KeyringBackend
}

// TODO: is this function duplicate of one from observertypes?
// TODO: remove this duplicated function https://github.com/zeta-chain/node/issues/1838
// ValidateChainParams performs some basic checks on core params
func ValidateChainParams(chainParams *observertypes.ChainParams) error {
if chainParams == nil {
Expand Down
13 changes: 7 additions & 6 deletions zetaclient/core_context/zeta_core_context_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package corecontext
package corecontext_test

import (
"testing"
Expand All @@ -8,13 +8,14 @@ import (
observertypes "github.com/zeta-chain/zetacore/x/observer/types"
clientcommon "github.com/zeta-chain/zetacore/zetaclient/common"
"github.com/zeta-chain/zetacore/zetaclient/config"
corecontext "github.com/zeta-chain/zetacore/zetaclient/core_context"
)

func TestNewZetaCoreContext(t *testing.T) {
t.Run("should create new zeta core context with empty config", func(t *testing.T) {
testCfg := config.NewConfig()

zetaContext := NewZetaCoreContext(testCfg)
zetaContext := corecontext.NewZetaCoreContext(testCfg)
require.NotNil(t, zetaContext)

// assert keygen
Expand Down Expand Up @@ -54,7 +55,7 @@ func TestNewZetaCoreContext(t *testing.T) {
},
},
}
zetaContext := NewZetaCoreContext(testCfg)
zetaContext := corecontext.NewZetaCoreContext(testCfg)
require.NotNil(t, zetaContext)

// assert evm chain params
Expand All @@ -80,7 +81,7 @@ func TestNewZetaCoreContext(t *testing.T) {
RPCHost: "test host",
RPCParams: "test params",
}
zetaContext := NewZetaCoreContext(testCfg)
zetaContext := corecontext.NewZetaCoreContext(testCfg)
require.NotNil(t, zetaContext)

// assert btc chain params panic because chain params are not yet updated
Expand All @@ -94,7 +95,7 @@ func TestUpdateZetaCoreContext(t *testing.T) {
t.Run("should update core context after being created from empty config", func(t *testing.T) {
testCfg := config.NewConfig()

zetaContext := NewZetaCoreContext(testCfg)
zetaContext := corecontext.NewZetaCoreContext(testCfg)
require.NotNil(t, zetaContext)

keyGenToUpdate := observertypes.Keygen{
Expand Down Expand Up @@ -178,7 +179,7 @@ func TestUpdateZetaCoreContext(t *testing.T) {
RPCParams: "test params",
}

zetaContext := NewZetaCoreContext(testCfg)
zetaContext := corecontext.NewZetaCoreContext(testCfg)
require.NotNil(t, zetaContext)

keyGenToUpdate := observertypes.Keygen{
Expand Down

0 comments on commit 34d22f7

Please sign in to comment.