Skip to content

Commit

Permalink
Merge branch 'uddugteam:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
andskur authored Dec 19, 2023
2 parents 35a76b3 + 980bffb commit 0a56247
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions internal/service/coinAvgPrice.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ func (s *coinAVGPriceSender) listenAndSendARGPrice(tokens []string, id int, freq

// reveal will wait the sleep time and then call the reveal smart-contract method
func (s *coinAVGPriceSender) reveal(sleep time.Duration, epochID *big.Int, indices []contracts.TokenID, prices []*big.Int, random *big.Int) {
logDebug(fmt.Sprintf("received for reveal: epochID %v, indices %v, prices %v, random %v", epochID, indices, prices, random), "reveal")
logDebug(fmt.Sprintln("sleep for:", sleep), "reveal")
time.Sleep(sleep)
logTrace(fmt.Sprintf("revealing price for the %v epoch", epochID.Int64()), "reveal")
Expand All @@ -149,9 +150,7 @@ func (s *coinAVGPriceSender) reveal(sleep time.Duration, epochID *big.Int, indic

// resetPrices is used to reset prices after all token prices are collected in the submit-reveal flow
func (s *coinAVGPriceSender) resetPrices() {
for _, t := range s.tokens {
s.prices[t] = nil
}
s.prices = make(map[contracts.TokenID]*big.Int)
}

// parsePrices is used to get big int prices from the prices map
Expand Down

0 comments on commit 0a56247

Please sign in to comment.