From 5086f8c7d43796d6aeb16cb29df6b1a2083db7ca Mon Sep 17 00:00:00 2001 From: skosito Date: Mon, 4 Mar 2024 15:27:48 +0100 Subject: [PATCH] Cleanup pointers from config --- cmd/zetaclientd/debug.go | 2 +- cmd/zetaclientd/main.go | 6 +- cmd/zetaclientd/p2p_diagnostics.go | 2 +- cmd/zetaclientd/start_utils.go | 15 ++-- cmd/zetaclientd/utils.go | 8 +-- zetaclient/app_context/app_context.go | 15 ++-- zetaclient/bitcoin/bitcoin_client_rpc_test.go | 2 +- zetaclient/common/utils_test.go | 4 +- zetaclient/config/config.go | 12 ++-- zetaclient/config/config_chain.go | 4 +- zetaclient/config/types.go | 69 ++++--------------- zetaclient/core_context/zeta_core_context.go | 5 +- .../core_context/zeta_core_context_test.go | 8 +-- zetaclient/evm/inbounds.go | 4 +- zetaclient/evm/inbounds_test.go | 4 +- zetaclient/keys/keys.go | 2 +- zetaclient/keys/keys_test.go | 4 +- .../supplychecker/zeta_supply_checker.go | 2 +- zetaclient/testutils/utils.go | 4 +- zetaclient/tss/tss_signer.go | 2 +- 20 files changed, 64 insertions(+), 110 deletions(-) diff --git a/cmd/zetaclientd/debug.go b/cmd/zetaclientd/debug.go index 8dcb6e666a..4d7eba1903 100644 --- a/cmd/zetaclientd/debug.go +++ b/cmd/zetaclientd/debug.go @@ -103,7 +103,7 @@ func DebugCmd() *cobra.Command { ob.WithLogger(chainLogger) client := ðclient.Client{} coinType := common.CoinType_Cmd - for chain, evmConfig := range cfg.GetAllEVMConfigs() { + for chain, evmConfig := range cfg.EVMChainConfigs { if chainID == chain { client, err = ethclient.Dial(evmConfig.Endpoint) if err != nil { diff --git a/cmd/zetaclientd/main.go b/cmd/zetaclientd/main.go index 767b1fd78e..07654a0375 100644 --- a/cmd/zetaclientd/main.go +++ b/cmd/zetaclientd/main.go @@ -60,7 +60,7 @@ func SetupConfigForTest() { } -func InitLogger(cfg *config.Config) (clientcommon.ClientLogger, error) { +func InitLogger(cfg config.Config) (clientcommon.ClientLogger, error) { // open compliance log file file, err := OpenComplianceLogFile(cfg) if err != nil { @@ -92,10 +92,10 @@ func InitLogger(cfg *config.Config) (clientcommon.ClientLogger, error) { }, nil } -func OpenComplianceLogFile(cfg *config.Config) (*os.File, error) { +func OpenComplianceLogFile(cfg config.Config) (*os.File, error) { // use zetacore home as default logPath := cfg.ZetaCoreHome - if cfg.ComplianceConfig != nil && cfg.ComplianceConfig.LogPath != "" { + if cfg.ComplianceConfig.LogPath != "" { logPath = cfg.ComplianceConfig.LogPath } diff --git a/cmd/zetaclientd/p2p_diagnostics.go b/cmd/zetaclientd/p2p_diagnostics.go index 38bc269bc6..72a1580224 100644 --- a/cmd/zetaclientd/p2p_diagnostics.go +++ b/cmd/zetaclientd/p2p_diagnostics.go @@ -26,7 +26,7 @@ import ( "github.com/zeta-chain/zetacore/zetaclient/config" ) -func RunDiagnostics(startLogger zerolog.Logger, peers p2p.AddrList, bridgePk cryptotypes.PrivKey, cfg *config.Config) error { +func RunDiagnostics(startLogger zerolog.Logger, peers p2p.AddrList, bridgePk cryptotypes.PrivKey, cfg config.Config) error { startLogger.Warn().Msg("P2P Diagnostic mode enabled") startLogger.Warn().Msgf("seed peer: %s", peers) diff --git a/cmd/zetaclientd/start_utils.go b/cmd/zetaclientd/start_utils.go index 042f2fb20d..fe87b1d4f6 100644 --- a/cmd/zetaclientd/start_utils.go +++ b/cmd/zetaclientd/start_utils.go @@ -13,12 +13,12 @@ import ( "google.golang.org/grpc" ) -func waitForZetaCore(configData *config.Config, logger zerolog.Logger) { +func waitForZetaCore(config config.Config, logger zerolog.Logger) { // wait until zetacore is up logger.Debug().Msg("Waiting for ZetaCore to open 9090 port...") for { _, err := grpc.Dial( - fmt.Sprintf("%s:9090", configData.ZetaCoreURL), + fmt.Sprintf("%s:9090", config.ZetaCoreURL), grpc.WithInsecure(), ) if err != nil { @@ -54,20 +54,19 @@ func validatePeer(seedPeer string) error { // maskCfg sensitive fields are masked, currently only the EVM endpoints and bitcoin credentials, // // other fields can be added. -func maskCfg(cfg *config.Config) string { +func maskCfg(cfg config.Config) string { maskedCfg := config.NewConfig() - // Deep copy since cfg contains some references - *maskedCfg = *cfg - maskedCfg.BitcoinConfig = &config.BTCConfig{ + maskedCfg = cfg + maskedCfg.BitcoinConfig = config.BTCConfig{ RPCUsername: cfg.BitcoinConfig.RPCUsername, RPCPassword: cfg.BitcoinConfig.RPCPassword, RPCHost: cfg.BitcoinConfig.RPCHost, RPCParams: cfg.BitcoinConfig.RPCParams, } - maskedCfg.EVMChainConfigs = map[int64]*config.EVMConfig{} + maskedCfg.EVMChainConfigs = map[int64]config.EVMConfig{} for key, val := range cfg.EVMChainConfigs { - maskedCfg.EVMChainConfigs[key] = &config.EVMConfig{ + maskedCfg.EVMChainConfigs[key] = config.EVMConfig{ Chain: val.Chain, Endpoint: val.Endpoint, } diff --git a/cmd/zetaclientd/utils.go b/cmd/zetaclientd/utils.go index 82a16dcb7f..6aa8379fa2 100644 --- a/cmd/zetaclientd/utils.go +++ b/cmd/zetaclientd/utils.go @@ -22,7 +22,7 @@ func CreateAuthzSigner(granter string, grantee sdk.AccAddress) { authz.SetupAuthZSignerList(granter, grantee) } -func CreateZetaBridge(cfg *config.Config, telemetry *metrics.TelemetryServer, hotkeyPassword string) (*zetabridge.ZetaCoreBridge, error) { +func CreateZetaBridge(cfg config.Config, telemetry *metrics.TelemetryServer, hotkeyPassword string) (*zetabridge.ZetaCoreBridge, error) { hotKey := cfg.AuthzHotkey if cfg.HsmMode { hotKey = cfg.HsmHotKey @@ -58,7 +58,7 @@ func CreateSignerMap( ) (map[common.Chain]interfaces.ChainSigner, error) { signerMap := make(map[common.Chain]interfaces.ChainSigner) // EVM signers - for _, evmConfig := range appContext.Config().GetAllEVMConfigs() { + for _, evmConfig := range appContext.Config().EVMChainConfigs { if evmConfig.Chain.IsZetaChain() { continue } @@ -100,11 +100,11 @@ func CreateChainClientMap( ) (map[common.Chain]interfaces.ChainClient, error) { clientMap := make(map[common.Chain]interfaces.ChainClient) // EVM clients - for _, evmConfig := range appContext.Config().GetAllEVMConfigs() { + for _, evmConfig := range appContext.Config().EVMChainConfigs { if evmConfig.Chain.IsZetaChain() { continue } - co, err := evm.NewEVMChainClient(appContext, bridge, tss, dbpath, loggers, *evmConfig, ts) + co, err := evm.NewEVMChainClient(appContext, bridge, tss, dbpath, loggers, evmConfig, ts) if err != nil { loggers.Std.Error().Err(err).Msgf("NewEVMChainClient error for chain %s", evmConfig.Chain.String()) continue diff --git a/zetaclient/app_context/app_context.go b/zetaclient/app_context/app_context.go index deab613618..38637b3846 100644 --- a/zetaclient/app_context/app_context.go +++ b/zetaclient/app_context/app_context.go @@ -9,13 +9,13 @@ import ( // AppContext contains global app structs like config, core context and logger type AppContext struct { coreContext *corecontext.ZetaCoreContext - config *config.Config + config config.Config } // NewAppContext creates and returns new AppContext func NewAppContext( coreContext *corecontext.ZetaCoreContext, - config *config.Config, + config config.Config, ) *AppContext { return &AppContext{ coreContext: coreContext, @@ -23,22 +23,21 @@ func NewAppContext( } } -func (a *AppContext) Config() *config.Config { +func (a AppContext) Config() config.Config { return a.config } -func (a *AppContext) ZetaCoreContext() *corecontext.ZetaCoreContext { +func (a AppContext) ZetaCoreContext() *corecontext.ZetaCoreContext { return a.coreContext } // GetBTCChainAndConfig returns btc chain and config if enabled -func (a *AppContext) GetBTCChainAndConfig() (common.Chain, config.BTCConfig, bool) { - btcConfig, configEnabled := a.Config().GetBTCConfig() +func (a AppContext) GetBTCChainAndConfig() (common.Chain, config.BTCConfig, bool) { btcChain, _, paramsEnabled := a.ZetaCoreContext().GetBTCChainParams() - if !configEnabled || !paramsEnabled { + if !a.config.BTCEnabled() || !paramsEnabled { return common.Chain{}, config.BTCConfig{}, false } - return btcChain, btcConfig, true + return btcChain, a.config.BitcoinConfig, true } diff --git a/zetaclient/bitcoin/bitcoin_client_rpc_test.go b/zetaclient/bitcoin/bitcoin_client_rpc_test.go index d40a08152c..7f8c060dce 100644 --- a/zetaclient/bitcoin/bitcoin_client_rpc_test.go +++ b/zetaclient/bitcoin/bitcoin_client_rpc_test.go @@ -46,7 +46,7 @@ func (suite *BitcoinClientTestSuite) SetupTest() { tss := interfaces.TestSigner{ PrivKey: privateKey, } - appContext := appcontext.NewAppContext(&corecontext.ZetaCoreContext{}, &config.Config{}) + appContext := appcontext.NewAppContext(&corecontext.ZetaCoreContext{}, config.Config{}) client, err := NewBitcoinClient(appContext, common.BtcRegtestChain(), nil, tss, "/tmp", clientcommon.DefaultLoggers(), nil) suite.Require().NoError(err) suite.BitcoinChainClient = client diff --git a/zetaclient/common/utils_test.go b/zetaclient/common/utils_test.go index 41b3f0c4cf..b7fa29b9bf 100644 --- a/zetaclient/common/utils_test.go +++ b/zetaclient/common/utils_test.go @@ -18,8 +18,8 @@ func TestCctxRestricted(t *testing.T) { require.NoError(t, err) // create config - cfg := &config.Config{ - ComplianceConfig: &config.ComplianceConfig{}, + cfg := config.Config{ + ComplianceConfig: config.ComplianceConfig{}, } t.Run("should return true if sender is restricted", func(t *testing.T) { diff --git a/zetaclient/config/config.go b/zetaclient/config/config.go index 08a9d4c002..4cb0e6b21b 100644 --- a/zetaclient/config/config.go +++ b/zetaclient/config/config.go @@ -36,12 +36,12 @@ func Save(config *Config, path string) error { } // Load loads ZetaClient config from a filepath -func Load(path string) (*Config, error) { +func Load(path string) (Config, error) { // retrieve file file := filepath.Join(path, folder, filename) file, err := filepath.Abs(file) if err != nil { - return nil, err + return Config{}, err } file = filepath.Clean(file) @@ -49,11 +49,11 @@ func Load(path string) (*Config, error) { cfg := NewConfig() input, err := os.ReadFile(file) if err != nil { - return nil, err + return Config{}, err } err = json.Unmarshal(input, &cfg) if err != nil { - return nil, err + return Config{}, err } // read keyring backend and use test by default @@ -61,7 +61,7 @@ func Load(path string) (*Config, error) { cfg.KeyringBackend = KeyringBackendTest } if cfg.KeyringBackend != KeyringBackendFile && cfg.KeyringBackend != KeyringBackendTest { - return nil, fmt.Errorf("invalid keyring backend %s", cfg.KeyringBackend) + return Config{}, fmt.Errorf("invalid keyring backend %s", cfg.KeyringBackend) } // fields sanitization @@ -75,7 +75,7 @@ func Load(path string) (*Config, error) { return cfg, nil } -func LoadComplianceConfig(cfg *Config) { +func LoadComplianceConfig(cfg Config) { restrictedAddressBook = cfg.GetRestrictedAddressBook() } diff --git a/zetaclient/config/config_chain.go b/zetaclient/config/config_chain.go index 2596c554a5..ea497a1821 100644 --- a/zetaclient/config/config_chain.go +++ b/zetaclient/config/config_chain.go @@ -38,14 +38,14 @@ func New() Config { } } -var bitcoinConfigRegnet = &BTCConfig{ +var bitcoinConfigRegnet = BTCConfig{ RPCUsername: "e2e", RPCPassword: "123", RPCHost: "bitcoin:18443", RPCParams: "regtest", } -var evmChainsConfigs = map[int64]*EVMConfig{ +var evmChainsConfigs = map[int64]EVMConfig{ common.EthChain().ChainId: { Chain: common.EthChain(), }, diff --git a/zetaclient/config/types.go b/zetaclient/config/types.go index a85f9f269e..2995705290 100644 --- a/zetaclient/config/types.go +++ b/zetaclient/config/types.go @@ -4,7 +4,6 @@ import ( "encoding/json" "fmt" "strings" - "sync" ethcommon "github.com/ethereum/go-ethereum/common" "github.com/zeta-chain/zetacore/common" @@ -51,8 +50,6 @@ type ComplianceConfig struct { // TODO: use snake case for json fields // https://github.com/zeta-chain/node/issues/1020 type Config struct { - cfgLock *sync.RWMutex `json:"-"` - Peer string `json:"Peer"` PublicIP string `json:"PublicIP"` LogFormat string `json:"LogFormat"` @@ -73,22 +70,22 @@ type Config struct { HsmMode bool `json:"HsmMode"` HsmHotKey string `json:"HsmHotKey"` - EVMChainConfigs map[int64]*EVMConfig `json:"EVMChainConfigs"` - BitcoinConfig *BTCConfig `json:"BitcoinConfig"` + EVMChainConfigs map[int64]EVMConfig `json:"EVMChainConfigs"` + BitcoinConfig BTCConfig `json:"BitcoinConfig"` // compliance config - ComplianceConfig *ComplianceConfig `json:"ComplianceConfig"` + ComplianceConfig ComplianceConfig `json:"ComplianceConfig"` } -func NewConfig() *Config { - return &Config{ - cfgLock: &sync.RWMutex{}, - } +func NewConfig() Config { + return Config{} +} + +func (c Config) BTCEnabled() bool { + return c.BitcoinConfig != BTCConfig{} } -func (c *Config) String() string { - c.cfgLock.RLock() - defer c.cfgLock.RUnlock() +func (c Config) String() string { s, err := json.MarshalIndent(c, "", "\t") if err != nil { return "" @@ -96,56 +93,18 @@ func (c *Config) String() string { return string(s) } -func (c *Config) GetEVMConfig(chainID int64) (EVMConfig, bool) { - c.cfgLock.RLock() - defer c.cfgLock.RUnlock() - evmCfg, found := c.EVMChainConfigs[chainID] - return *evmCfg, found -} - -func (c *Config) GetAllEVMConfigs() map[int64]*EVMConfig { - c.cfgLock.RLock() - defer c.cfgLock.RUnlock() - - // deep copy evm configs - copied := make(map[int64]*EVMConfig, len(c.EVMChainConfigs)) - for chainID, evmConfig := range c.EVMChainConfigs { - copied[chainID] = &EVMConfig{} - *copied[chainID] = *evmConfig - } - return copied -} - -func (c *Config) GetBTCConfig() (BTCConfig, bool) { - c.cfgLock.RLock() - defer c.cfgLock.RUnlock() - - if c.BitcoinConfig == nil { // bitcoin is not enabled - return BTCConfig{}, false - } - return *c.BitcoinConfig, true -} - // GetRestrictedAddressBook returns a map of restricted addresses // Note: the restricted address book contains both ETH and BTC addresses -func (c *Config) GetRestrictedAddressBook() map[string]bool { +func (c Config) GetRestrictedAddressBook() map[string]bool { restrictedAddresses := make(map[string]bool) - if c.ComplianceConfig != nil { - for _, address := range c.ComplianceConfig.RestrictedAddresses { - if address != "" { - restrictedAddresses[strings.ToLower(address)] = true - } + for _, address := range c.ComplianceConfig.RestrictedAddresses { + if address != "" { + restrictedAddresses[strings.ToLower(address)] = true } } return restrictedAddresses } -func (c *Config) GetKeyringBackend() KeyringBackend { - c.cfgLock.RLock() - defer c.cfgLock.RUnlock() - return c.KeyringBackend -} - // 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.go b/zetaclient/core_context/zeta_core_context.go index 0c5794f4cd..94871b03a6 100644 --- a/zetaclient/core_context/zeta_core_context.go +++ b/zetaclient/core_context/zeta_core_context.go @@ -24,14 +24,13 @@ type ZetaCoreContext struct { // NewZetaCoreContext creates and returns new ZetaCoreContext // it is initializing chain params from provided config -func NewZetaCoreContext(cfg *config.Config) *ZetaCoreContext { +func NewZetaCoreContext(cfg config.Config) *ZetaCoreContext { evmChainParams := make(map[int64]*observertypes.ChainParams) for _, e := range cfg.EVMChainConfigs { evmChainParams[e.Chain.ChainId] = &observertypes.ChainParams{} } var bitcoinChainParams *observertypes.ChainParams - _, found := cfg.GetBTCConfig() - if found { + if cfg.BTCEnabled() { bitcoinChainParams = &observertypes.ChainParams{} } return &ZetaCoreContext{ diff --git a/zetaclient/core_context/zeta_core_context_test.go b/zetaclient/core_context/zeta_core_context_test.go index 2620ac5445..6b559ccca2 100644 --- a/zetaclient/core_context/zeta_core_context_test.go +++ b/zetaclient/core_context/zeta_core_context_test.go @@ -41,7 +41,7 @@ func TestNewZetaCoreContext(t *testing.T) { t.Run("should create new zeta core context with config containing evm chain params", func(t *testing.T) { testCfg := config.NewConfig() - testCfg.EVMChainConfigs = map[int64]*config.EVMConfig{ + testCfg.EVMChainConfigs = map[int64]config.EVMConfig{ 1: { Chain: common.Chain{ ChainName: 1, @@ -75,7 +75,7 @@ func TestNewZetaCoreContext(t *testing.T) { t.Run("should create new zeta core context with config containing btc config", func(t *testing.T) { testCfg := config.NewConfig() - testCfg.BitcoinConfig = &config.BTCConfig{ + testCfg.BitcoinConfig = config.BTCConfig{ RPCUsername: "test username", RPCPassword: "test password", RPCHost: "test host", @@ -159,7 +159,7 @@ func TestUpdateZetaCoreContext(t *testing.T) { t.Run("should update core context after being created from config with evm and btc chain params", func(t *testing.T) { testCfg := config.NewConfig() - testCfg.EVMChainConfigs = map[int64]*config.EVMConfig{ + testCfg.EVMChainConfigs = map[int64]config.EVMConfig{ 1: { Chain: common.Chain{ ChainName: 1, @@ -173,7 +173,7 @@ func TestUpdateZetaCoreContext(t *testing.T) { }, }, } - testCfg.BitcoinConfig = &config.BTCConfig{ + testCfg.BitcoinConfig = config.BTCConfig{ RPCUsername: "test username", RPCPassword: "test password", RPCHost: "test host", diff --git a/zetaclient/evm/inbounds.go b/zetaclient/evm/inbounds.go index ffb65fd5f4..2453d38f47 100644 --- a/zetaclient/evm/inbounds.go +++ b/zetaclient/evm/inbounds.go @@ -169,9 +169,7 @@ func (ob *ChainClient) CheckReceiptForCoinTypeERC20(txHash string, vote bool) (s err = ob.CheckEvmTxLog(&zetaDeposited.Raw, addrCustory, txHash, TopicsDeposited) if err == nil { msg = ob.GetInboundVoteMsgForDepositedEvent(zetaDeposited, sender) - if err == nil { - break - } + break } else { ob.logger.ExternalChainWatcher.Error().Err(err).Msg("CheckEvmTxLog error on ERC20CustodyDeposited event") } diff --git a/zetaclient/evm/inbounds_test.go b/zetaclient/evm/inbounds_test.go index 84b24dd200..a1579f08ff 100644 --- a/zetaclient/evm/inbounds_test.go +++ b/zetaclient/evm/inbounds_test.go @@ -63,8 +63,8 @@ func TestEthereum_GetInboundVoteMsgForZetaSentEvent(t *testing.T) { require.Equal(t, "0x477544c4b8c8be544b23328b21286125c89cd6bb5d1d6d388d91eea8ea1a6f1f", msg.Digest()) // create config - cfg := &config.Config{ - ComplianceConfig: &config.ComplianceConfig{}, + cfg := config.Config{ + ComplianceConfig: config.ComplianceConfig{}, } t.Run("should return nil msg if sender is restricted", func(t *testing.T) { diff --git a/zetaclient/keys/keys.go b/zetaclient/keys/keys.go index 974743098f..e7e40c2bdc 100644 --- a/zetaclient/keys/keys.go +++ b/zetaclient/keys/keys.go @@ -44,7 +44,7 @@ func GetGranteeKeyName(signerName string) string { } // GetKeyringKeybase return keyring and key info -func GetKeyringKeybase(cfg *config.Config, hotkeyPassword string) (ckeys.Keyring, string, error) { +func GetKeyringKeybase(cfg config.Config, hotkeyPassword string) (ckeys.Keyring, string, error) { granteeName := cfg.AuthzHotkey chainHomeFolder := cfg.ZetaCoreHome logger := log.Logger.With().Str("module", "GetKeyringKeybase").Logger() diff --git a/zetaclient/keys/keys_test.go b/zetaclient/keys/keys_test.go index 5cbdeec5d5..2b37f5a63c 100644 --- a/zetaclient/keys/keys_test.go +++ b/zetaclient/keys/keys_test.go @@ -63,7 +63,7 @@ func (*KeysSuite) setupKeysForTest(c *C) string { func (ks *KeysSuite) TestGetKeyringKeybase(c *C) { keyring.Debug = true - cfg := &config.Config{ + cfg := config.Config{ AuthzHotkey: "bob", ZetaCoreHome: "/Users/test/.zetacored/", } @@ -83,7 +83,7 @@ func (ks *KeysSuite) TestNewKeys(c *C) { c.Assert(err, IsNil) }() - cfg := &config.Config{ + cfg := config.Config{ AuthzHotkey: signerNameForTest, ZetaCoreHome: folder, } diff --git a/zetaclient/supplychecker/zeta_supply_checker.go b/zetaclient/supplychecker/zeta_supply_checker.go index 2a2e112c4a..c5dce419cd 100644 --- a/zetaclient/supplychecker/zeta_supply_checker.go +++ b/zetaclient/supplychecker/zeta_supply_checker.go @@ -49,7 +49,7 @@ func NewZetaSupplyChecker(appContext *appcontext.AppContext, zetaClient *zetabri coreContext: appContext.ZetaCoreContext(), zetaClient: zetaClient, } - for _, evmConfig := range appContext.Config().GetAllEVMConfigs() { + for _, evmConfig := range appContext.Config().EVMChainConfigs { if evmConfig.Chain.IsZetaChain() { continue } diff --git a/zetaclient/testutils/utils.go b/zetaclient/testutils/utils.go index 4f00f10bfd..2e26dec67d 100644 --- a/zetaclient/testutils/utils.go +++ b/zetaclient/testutils/utils.go @@ -56,8 +56,8 @@ func SaveBTCBlockTrimTx(blockVb *btcjson.GetBlockVerboseTxResult, filename strin return SaveObjectToJSONFile(blockVb, filename) } -func ComplianceConfigTest() *config.ComplianceConfig { - return &config.ComplianceConfig{ +func ComplianceConfigTest() config.ComplianceConfig { + return config.ComplianceConfig{ RestrictedAddresses: []string{RestrictedEVMAddressTest, RestrictedBtcAddressTest}, } } diff --git a/zetaclient/tss/tss_signer.go b/zetaclient/tss/tss_signer.go index f9abdb78ee..b95baadf1b 100644 --- a/zetaclient/tss/tss_signer.go +++ b/zetaclient/tss/tss_signer.go @@ -127,7 +127,7 @@ func NewTSS( return &newTss, nil } -func SetupTSSServer(peer p2p.AddrList, privkey tmcrypto.PrivKey, preParams *keygen.LocalPreParams, cfg *config.Config, tssPassword string) (*tss.TssServer, error) { +func SetupTSSServer(peer p2p.AddrList, privkey tmcrypto.PrivKey, preParams *keygen.LocalPreParams, cfg config.Config, tssPassword string) (*tss.TssServer, error) { bootstrapPeers := peer log.Info().Msgf("Peers AddrList %v", bootstrapPeers)