Commit d0f27c58 authored by antstalepresh's avatar antstalepresh
Browse files

output problematic lockups

parent f240c18d
Showing with 5 additions and 0 deletions
+5 -0
......@@ -3,7 +3,9 @@ package keeper
// DONTCOVER
import (
"encoding/json"
"fmt"
"io/ioutil"
"time"
sdk "github.com/cosmos/cosmos-sdk/types"
......@@ -62,6 +64,9 @@ func AccumulationStoreInvariant(keeper Keeper) sdk.Invariant {
}
if !accumulation.Equal(lockupSum) {
problematicLocks, _ := json.MarshalIndent(locks, "", " ")
ioutil.WriteFile("lockup-export.json", problematicLocks, 0644)
return sdk.FormatInvariant(types.ModuleName, "accumulation-store-invariant",
fmt.Sprintf("\taccumulation store value does not fit actual lockup sum: %s != %s, denom=%s duration=%s\n",
accumulation.String(), lockupSum.String(), denom, duration.String(),
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment