From 79b5899cdcc223b279e20e200a625acedde58ca3 Mon Sep 17 00:00:00 2001 From: yan-soon Date: Mon, 9 Dec 2024 14:36:21 +0800 Subject: [PATCH] remove checks for config values as it is handled in validateBasic() --- oracle/service/runner/runner.go | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/oracle/service/runner/runner.go b/oracle/service/runner/runner.go index b2167592a4..971dd44425 100644 --- a/oracle/service/runner/runner.go +++ b/oracle/service/runner/runner.go @@ -9,7 +9,6 @@ import ( log "github.com/sirupsen/logrus" - "github.com/cometbft/cometbft/config" "github.com/cometbft/cometbft/oracle/service/types" "github.com/cometbft/cometbft/oracle/service/utils" @@ -100,25 +99,12 @@ func ProcessSignVoteQueue(oracleInfo *types.OracleInfo, chainId string) { func PruneVoteBuffers(oracleInfo *types.OracleInfo, consensusState *cs.State) { go func(oracleInfo *types.OracleInfo) { - defaultOracleConfig := config.DefaultOracleConfig() - // only keep votes that are less than x blocks old, where x = Config.MaxOracleGossipBlocksDelayed maxOracleGossipBlocksDelayed := oracleInfo.Config.MaxOracleGossipBlocksDelayed - if maxOracleGossipBlocksDelayed == 0 { - maxOracleGossipBlocksDelayed = defaultOracleConfig.MaxOracleGossipBlocksDelayed - } - // only keep votes that are less than x seconds old, where x = Config.MaxOracleGossipAge maxOracleGossipAge := oracleInfo.Config.MaxOracleGossipAge - if maxOracleGossipAge == 0 { - maxOracleGossipAge = defaultOracleConfig.MaxOracleGossipAge - } - // run pruner every x milliseconds, where x = Config.PruneInterval pruneInterval := oracleInfo.Config.PruneInterval - if pruneInterval == 0 { - pruneInterval = defaultOracleConfig.PruneInterval - } ticker := time.Tick(pruneInterval) for range ticker {