Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Register
Sign in
Toggle navigation
Menu
Open sidebar
Tiger Ton
Osmosis_Sync
Commits
d0f27c58
Commit
d0f27c58
authored
3 years ago
by
antstalepresh
Browse files
Options
Download
Email Patches
Plain Diff
output problematic lockups
parent
f240c18d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
x/lockup/keeper/invariants.go
+5
-0
x/lockup/keeper/invariants.go
with
5 additions
and
0 deletions
+5
-0
x/lockup/keeper/invariants.go
+
5
-
0
View file @
d0f27c58
...
...
@@ -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
(
"
\t
accumulation store value does not fit actual lockup sum: %s != %s, denom=%s duration=%s
\n
"
,
accumulation
.
String
(),
lockupSum
.
String
(),
denom
,
duration
.
String
(),
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets