diff --git a/cmd/zetaclientd/start.go b/cmd/zetaclientd/start.go index 56c074640a..3546cec8ad 100644 --- a/cmd/zetaclientd/start.go +++ b/cmd/zetaclientd/start.go @@ -144,7 +144,7 @@ func start(_ *cobra.Command, _ []string) error { startLogger.Debug().Msgf("CreateAuthzSigner is ready") // Initialize core parameters from zetacore - appContext := context.New(cfg, logger.Std) + appContext := context.New(cfg, masterLogger) err = zetacoreClient.UpdateZetacoreContext(appContext, true, startLogger) if err != nil { startLogger.Error().Err(err).Msg("Error getting core parameters") diff --git a/zetaclient/chains/base/observer.go b/zetaclient/chains/base/observer.go index 6974dc3417..edfef83629 100644 --- a/zetaclient/chains/base/observer.go +++ b/zetaclient/chains/base/observer.go @@ -45,6 +45,7 @@ type Observer struct { // chainParams contains the dynamic chain parameters of the observed chain chainParams observertypes.ChainParams + // appContext contains context data for zetaclient & zetacore (e.g. supported chains) appContext *context.AppContext // zetacoreClient is the client to interact with ZetaChain diff --git a/zetaclient/chains/base/observer_test.go b/zetaclient/chains/base/observer_test.go index 72785cd130..e6d5a088a9 100644 --- a/zetaclient/chains/base/observer_test.go +++ b/zetaclient/chains/base/observer_test.go @@ -26,7 +26,7 @@ func createObserver(t *testing.T) *base.Observer { // constructor parameters chain := chains.Ethereum chainParams := *sample.ChainParams(chain.ChainId) - zetacoreContext := context.New(config.NewConfig(), zerolog.Nop()) + appContext := context.New(config.NewConfig(), zerolog.Nop()) zetacoreClient := mocks.NewMockZetacoreClient() tss := mocks.NewTSSMainnet() @@ -35,7 +35,7 @@ func createObserver(t *testing.T) *base.Observer { ob, err := base.NewObserver( chain, chainParams, - zetacoreContext, + appContext, zetacoreClient, tss, base.DefaultBlockCacheSize,