From 09522ef1f48e7c0951f78978c4885bdbed6bad89 Mon Sep 17 00:00:00 2001 From: leonz789 Date: Mon, 30 Sep 2024 09:49:45 +0800 Subject: [PATCH] remove debug code --- fetcher/beaconchain/beaconchain.go | 11 ++++++----- fetcher/fetcher.go | 4 ---- go.mod | 3 --- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/fetcher/beaconchain/beaconchain.go b/fetcher/beaconchain/beaconchain.go index 5178942..0cc1392 100644 --- a/fetcher/beaconchain/beaconchain.go +++ b/fetcher/beaconchain/beaconchain.go @@ -95,12 +95,13 @@ var ( lock sync.RWMutex // updated from oracle, deposit/withdraw // TEST only. debug - validatorsTmp = []string{ - "0xa1d1ad0714035353258038e964ae9675dc0252ee22cea896825c01458e1807bfad2f9969338798548d9858a571f7425c", - "0xb2ff4716ed345b05dd1dfc6a5a9fa70856d8c75dcc9e881dd2f766d5f891326f0d10e96f3a444ce6c912b69c22c6754d", - } + // validatorsTmp = []string{ + // "0xa1d1ad0714035353258038e964ae9675dc0252ee22cea896825c01458e1807bfad2f9969338798548d9858a571f7425c", + // "0xb2ff4716ed345b05dd1dfc6a5a9fa70856d8c75dcc9e881dd2f766d5f891326f0d10e96f3a444ce6c912b69c22c6754d", + // } - stakerValidators = map[int]*validatorList{2: {0, validatorsTmp}} + // stakerValidators = map[int]*validatorList{2: {0, validatorsTmp}} + stakerValidators = make(map[int]*validatorList) // latest finalized epoch we've got balances summarized for stakers finalizedEpoch uint64 // latest stakerBalanceChanges, initialized as 0 change (256-0 of 1st parts means that all stakers have 32 efb) diff --git a/fetcher/fetcher.go b/fetcher/fetcher.go index 2500700..43ef971 100644 --- a/fetcher/fetcher.go +++ b/fetcher/fetcher.go @@ -162,10 +162,8 @@ func (s *source) AddToken(name string) bool { for { select { case <-tic.C: - fmt.Printf("debug---fetch_triggered by tic.interval.30, token%s\r\n", tName) price, err := s.fetch(tName) prevPrice := priceInfo.GetInfo() - fmt.Printf("debug----token:%s, price:%v, length_of_bytes:%d\r\n", tName, price, len(price.Price)) if err == nil && (prevPrice.Price != price.Price || prevPrice.Decimal != price.Decimal) { priceInfo.UpdateInfo(price) log.Printf("update token:%s, price:%s, decimal:%d", tName, price.Price, price.Decimal) @@ -196,10 +194,8 @@ func (s *source) Fetch(interval time.Duration) { for { select { case <-tic.C: - fmt.Printf("debug---fetch_triggered by tic.interval.30, token%s\r\n", tName) price, err := s.fetch(tName) prevPrice := priceInfo.GetInfo() - fmt.Printf("debug----token:%s, price:%v, length_of_bytes:%d\r\n", tName, price, len(price.Price)) if err == nil && (prevPrice.Price != price.Price || prevPrice.Decimal != price.Decimal) { priceInfo.UpdateInfo(price) log.Printf("update token:%s, price:%s, decimal:%d", tName, price.Price, price.Decimal) diff --git a/go.mod b/go.mod index 38068cf..2a0668a 100644 --- a/go.mod +++ b/go.mod @@ -241,9 +241,6 @@ replace ( // use cosmos fork of keyring github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0 - // debug. test only - github.com/ExocoreNetwork/exocore v0.0.0-20240926031231-b7a9717fb266 => /Users/linqing/workplace/github.com/leonz/exocore - // use Cosmos-SDK fork to enable Ledger functionality github.com/cosmos/cosmos-sdk => github.com/evmos/cosmos-sdk v0.47.5-evmos.2 //fix cosmos-sdk error