From 878e13ba8cd48e0d441f3fbc4d5cfa7cb190145a Mon Sep 17 00:00:00 2001 From: Eugene Kim Date: Mon, 2 Dec 2019 13:26:22 -0800 Subject: [PATCH] Remove unused nodeconfig.SetConfigs --- internal/configs/node/config.go | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/internal/configs/node/config.go b/internal/configs/node/config.go index d633a1790..3f5bba46c 100644 --- a/internal/configs/node/config.go +++ b/internal/configs/node/config.go @@ -5,7 +5,6 @@ package nodeconfig import ( "crypto/ecdsa" - "errors" "fmt" "sync" @@ -111,18 +110,6 @@ func GetShardConfig(shardID uint32) *ConfigType { return &shardConfigs[shardID] } -// SetConfigs set ConfigType in the right index. -func SetConfigs(config ConfigType, shardID uint32) error { - onceForConfigs.Do(func() { - shardConfigs = make([]ConfigType, MaxShards) - }) - if int(shardID) >= cap(shardConfigs) { - return errors.New("Failed to set ConfigType") - } - shardConfigs[int(shardID)] = config - return nil -} - // GetDefaultConfig returns default config. func GetDefaultConfig() *ConfigType { return &defaultConfig