From d8a9a5a3c0ac2ffda18de3f065efc9f0c15dc0f1 Mon Sep 17 00:00:00 2001 From: Conor Patrick Date: Wed, 21 Dec 2022 16:31:38 +0000 Subject: [PATCH] disable invariant for checking 0 self delegation --- x/staking/keeper/invariants.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/x/staking/keeper/invariants.go b/x/staking/keeper/invariants.go index 52a45504db..b7157dfb23 100644 --- a/x/staking/keeper/invariants.go +++ b/x/staking/keeper/invariants.go @@ -140,12 +140,12 @@ func PositiveDelegationInvariant(k Keeper) sdk.Invariant { msg += fmt.Sprintf("\tdelegation with negative shares: %+v\n", delegation) } + // TODO: turn this back on after all validators use self delegations + // if delegation.Shares.IsZero() { + // count++ - if delegation.Shares.IsZero() { - count++ - - msg += fmt.Sprintf("\tdelegation with zero shares: %+v\n", delegation) - } + // msg += fmt.Sprintf("\tdelegation with zero shares: %+v\n", delegation) + // } } broken := count != 0