From 34d22f771304c96d4205b3527b8b9d1f70eb02ba Mon Sep 17 00:00:00 2001 From: skosito Date: Tue, 5 Mar 2024 18:56:32 +0100 Subject: [PATCH] PR comments --- zetaclient/config/types.go | 2 +- zetaclient/core_context/zeta_core_context_test.go | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/zetaclient/config/types.go b/zetaclient/config/types.go index 13e5d6a337..3e8c3c3692 100644 --- a/zetaclient/config/types.go +++ b/zetaclient/config/types.go @@ -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 { diff --git a/zetaclient/core_context/zeta_core_context_test.go b/zetaclient/core_context/zeta_core_context_test.go index 08060d1181..e7690f0c23 100644 --- a/zetaclient/core_context/zeta_core_context_test.go +++ b/zetaclient/core_context/zeta_core_context_test.go @@ -1,4 +1,4 @@ -package corecontext +package corecontext_test import ( "testing" @@ -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 @@ -54,7 +55,7 @@ func TestNewZetaCoreContext(t *testing.T) { }, }, } - zetaContext := NewZetaCoreContext(testCfg) + zetaContext := corecontext.NewZetaCoreContext(testCfg) require.NotNil(t, zetaContext) // assert evm chain params @@ -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 @@ -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{ @@ -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{