Skip to content

Commit

Permalink
remove debug code
Browse files Browse the repository at this point in the history
  • Loading branch information
leonz789 committed Sep 30, 2024
1 parent 0e1a224 commit 09522ef
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
11 changes: 6 additions & 5 deletions fetcher/beaconchain/beaconchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 0 additions & 4 deletions fetcher/fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
3 changes: 0 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 09522ef

Please sign in to comment.