Skip to content

R4R: Add metrics initialization#1344

Merged
wukongcheng merged 2 commits intoirisnet:developfrom
chengwenxi:metrics
Mar 6, 2019
Merged

R4R: Add metrics initialization#1344
wukongcheng merged 2 commits intoirisnet:developfrom
chengwenxi:metrics

Conversation

@chengwenxi
Copy link
Contributor

Closes: #1331

HaoyangLiu
HaoyangLiu previously approved these changes Mar 5, 2019
addr := iterator.Key()[1:]
validator := types.MustUnmarshalValidator(k.cdc, addr, iterator.Value())
tokenPrecision := sdk.NewIntWithDecimal(1, 18)
bondedToken, err := strconv.ParseFloat(validator.GetTokens().QuoInt(tokenPrecision).String(), 64)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's replace magic number 18 in sdk.NewIntWithDecimal(1, 18) with something like: sdk.AttoUnit(sdk.NativeTokenName).Decimal

A bit too long, maybe add some convenience methods into CoinType?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added AttoPrecision in coin_type.

@haifengxi haifengxi added the bug Something isn't working label Mar 6, 2019
haifengxi
haifengxi previously approved these changes Mar 6, 2019

// Returns an iterator for all the request in the Active Queue
func (k Keeper) ActiveAllRequestQueueIterator(store sdk.KVStore) sdk.Iterator {
return sdk.KVStorePrefixIterator(store, returnedFeeKey)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why use the returnedFeeKey ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working metric

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants