Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: reduce ABCI logging [BLO-1513] #595

Merged
merged 1 commit into from
Jul 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions pkg/math/voteweighted/voteweighted.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
// Retrieve the validator from the validator store and get its vote weight.
address, err := sdk.ConsAddressFromBech32(valAddress)
if err != nil {
logger.Info(
logger.Error(

Check warning on line 73 in pkg/math/voteweighted/voteweighted.go

View check run for this annotation

Codecov / codecov/patch

pkg/math/voteweighted/voteweighted.go#L73

Added line #L73 was not covered by tests
"failed to parse validator address; skipping validator prices",
"validator_address", valAddress,
"err", err,
Expand All @@ -81,7 +81,7 @@

validator, err := validatorStore.ValidatorByConsAddr(ctx, address)
if err != nil {
logger.Info(
logger.Error(

Check warning on line 84 in pkg/math/voteweighted/voteweighted.go

View check run for this annotation

Codecov / codecov/patch

pkg/math/voteweighted/voteweighted.go#L84

Added line #L84 was not covered by tests
"failed to retrieve validator from store; skipping validator prices",
"validator_address", valAddress,
"err", err,
Expand All @@ -96,7 +96,7 @@
for currencyPair, price := range validatorPrices {
// Only include prices that are not nil.
if price == nil {
logger.Info(
logger.Debug(

Check warning on line 99 in pkg/math/voteweighted/voteweighted.go

View check run for this annotation

Codecov / codecov/patch

pkg/math/voteweighted/voteweighted.go#L99

Added line #L99 was not covered by tests
"price is nil",
"currency_pair", currencyPair.String(),
"validator_address", valAddress,
Expand Down Expand Up @@ -139,7 +139,7 @@
if percentSubmitted := math.LegacyNewDecFromInt(info.TotalWeight).Quo(math.LegacyNewDecFromInt(totalBondedTokens)); percentSubmitted.GTE(threshold) {
prices[currencyPair] = ComputeMedian(info)

logger.Info(
logger.Debug(
"computed stake-weighted median price for currency pair",
"currency_pair", currencyPair.String(),
"percent_submitted", percentSubmitted.String(),
Expand All @@ -148,7 +148,7 @@
"num_validators", len(info.Prices),
)
} else {
logger.Info(
logger.Debug(
"not enough voting power to compute stake-weighted median price price for currency pair",
"currency_pair", currencyPair.String(),
"threshold", threshold.String(),
Expand Down
Loading