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

feat(vpool): complete genesis import export #959

Merged
merged 27 commits into from
Sep 21, 2022
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
425fa2b
add genesis snapshots
AgentSmithMatrix Sep 20, 2022
94765e1
add pair into pair reserve snapshot
AgentSmithMatrix Sep 20, 2022
0cf99bf
include pair into snapshot
AgentSmithMatrix Sep 20, 2022
c43e54a
use new constructor part 1
AgentSmithMatrix Sep 20, 2022
db841fd
add snapshot pair
AgentSmithMatrix Sep 20, 2022
1bc521a
remove unused code
AgentSmithMatrix Sep 20, 2022
b4de2ec
replace constructor in SaveSnapshot
AgentSmithMatrix Sep 20, 2022
39a6919
fix lint
AgentSmithMatrix Sep 20, 2022
e9faeb1
use temporary reserve snapshot
AgentSmithMatrix Sep 20, 2022
4b338ec
add reserve snapshot
AgentSmithMatrix Sep 20, 2022
0696865
switch function
AgentSmithMatrix Sep 20, 2022
864678f
remove unused code
AgentSmithMatrix Sep 20, 2022
a953dd8
refactor usage on tests
AgentSmithMatrix Sep 20, 2022
e1f3021
use new constructor on prices test
AgentSmithMatrix Sep 20, 2022
7c1a302
remove usage of old function
AgentSmithMatrix Sep 20, 2022
cd79884
rename function to NewReserveSnapshot
AgentSmithMatrix Sep 20, 2022
2ab2d7f
set vpool genesis snapshots as not nullable
AgentSmithMatrix Sep 20, 2022
5df1119
use common.AssetPair for ReserveSnapshot
AgentSmithMatrix Sep 20, 2022
f17d8fc
SaveSnapshot accepts a snapshot instead of building it
AgentSmithMatrix Sep 20, 2022
2ff88cc
refavctor genesis test
AgentSmithMatrix Sep 20, 2022
81d8c9a
add genesis getAllSnapshots
AgentSmithMatrix Sep 20, 2022
4a98c73
add export and import snapshots
AgentSmithMatrix Sep 20, 2022
176294d
remove unused params
AgentSmithMatrix Sep 20, 2022
99d3934
add validate to snapshot
AgentSmithMatrix Sep 20, 2022
3348864
add genesis validate
AgentSmithMatrix Sep 20, 2022
bcef091
update changelog
AgentSmithMatrix Sep 20, 2022
b704e83
fix linter problems
AgentSmithMatrix Sep 21, 2022
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
Prev Previous commit
Next Next commit
remove unused code
AgentSmithMatrix committed Sep 20, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 1bc521a04a5bd59e255b0db349b4363af667347d
12 changes: 0 additions & 12 deletions x/vpool/keeper/keeper_test.go
Original file line number Diff line number Diff line change
@@ -738,12 +738,6 @@ func TestGetMaintenanceMarginRatio(t *testing.T) {
MaintenanceMarginRatio: sdk.MustNewDecFromStr("0.42"),
MaxLeverage: sdk.OneDec(),
},
snapshot: types.ReserveSnapshot{
QuoteAssetReserve: sdk.NewDec(1000),
BaseAssetReserve: sdk.OneDec(),
TimestampMs: 0,
BlockNumber: 0,
},
expectedMaintenanceMarginRatio: sdk.MustNewDecFromStr("0.42"),
},
{
@@ -758,12 +752,6 @@ func TestGetMaintenanceMarginRatio(t *testing.T) {
MaintenanceMarginRatio: sdk.MustNewDecFromStr("0.4242"),
MaxLeverage: sdk.OneDec(),
},
snapshot: types.ReserveSnapshot{
QuoteAssetReserve: sdk.NewDec(1000),
BaseAssetReserve: sdk.OneDec(),
TimestampMs: 0,
BlockNumber: 0,
},
expectedMaintenanceMarginRatio: sdk.MustNewDecFromStr("0.4242"),
},
}