Skip to content

Commit

Permalink
remove debug info
Browse files Browse the repository at this point in the history
  • Loading branch information
kstoykov committed Dec 21, 2021
1 parent 76f989e commit 577ec8d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions module/x/gravity/keeper/attestation.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,18 +84,18 @@ func (k Keeper) TryAttestation(ctx sdk.Context, att *types.Attestation) {

var staticTotalPower uint64 = 0
for _, validator := range validators {
ctx.Logger().Error("Attesation", "validator.OperatorAddress", validator.OperatorAddress)
// ctx.Logger().Error("Debug Attesation", "validator.OperatorAddress", validator.OperatorAddress)
if _, found := staticValOperAddrsMap[validator.OperatorAddress]; !found {
ctx.Logger().Error("Attesation", "Skipped validator.OperatorAddress", validator.OperatorAddress)
// ctx.Logger().Error("Debug Attesation", "Skipped validator.OperatorAddress", validator.OperatorAddress)
continue
}

ctx.Logger().Error("Attesation", "Static validator.OperatorAddress", validator.OperatorAddress)
// ctx.Logger().Error("Debug Attesation", "Static validator.OperatorAddress", validator.OperatorAddress)
val := validator.GetOperator()
p := uint64(k.StakingKeeper.GetLastValidatorPower(ctx, val))
staticTotalPower += p
}
ctx.Logger().Error("Attesation", "staticTotalPower", staticTotalPower)
// ctx.Logger().Error("Debug Attesation", "staticTotalPower", staticTotalPower)
totalPower := sdk.NewIntFromUint64(staticTotalPower)

requiredPower := types.AttestationVotesPowerThreshold.Mul(totalPower).Quo(sdk.NewInt(100))
Expand Down
8 changes: 4 additions & 4 deletions module/x/gravity/keeper/keeper_valset.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,15 +239,15 @@ func (k Keeper) GetCurrentValset(ctx sdk.Context) *types.Valset {
// TODO someone with in depth info on Cosmos staking should determine
// if this is doing what I think it's doing

ctx.Logger().Error("Keeper_valset", "staticValOperAddrsMap", staticValOperAddrsMap)
// ctx.Logger().Error("Debug Keeper_valset", "staticValOperAddrsMap", staticValOperAddrsMap)
for _, validator := range validators {
val := validator.GetOperator()

ctx.Logger().Error("Keeper_valset", "Check Validator", validator.OperatorAddress)
// ctx.Logger().Error("Debug Keeper_valset", "Check Validator", validator.OperatorAddress)
if _, found := staticValOperAddrsMap[validator.OperatorAddress]; !found {
continue
}
ctx.Logger().Error("Keeper_valset", "Static Validator", validator.OperatorAddress)
// ctx.Logger().Error("Debug Keeper_valset", "Static Validator", validator.OperatorAddress)

p := uint64(k.StakingKeeper.GetLastValidatorPower(ctx, val))

Expand Down Expand Up @@ -288,7 +288,7 @@ func (k Keeper) GetCurrentValset(ctx sdk.Context) *types.Valset {
if err != nil {
panic(sdkerrors.Wrap(err, "generated invalid valset"))
}
ctx.Logger().Error("Debug", "valset", valset)
// ctx.Logger().Error("Debug Valset", "valset", valset)
return valset
}

Expand Down

0 comments on commit 577ec8d

Please sign in to comment.