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

test(systemtests): fix query block-results in TestStakeUnstake for v2 #22782

Merged
merged 2 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 0 additions & 7 deletions server/v2/testdata/app.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,6 @@ ss-type = 'pebble'
# State commitment database type. Currently we support: "iavl" and "iavl-v2"
sc-type = 'iavl'

# Pruning options for state storage
[store.options.ss-pruning-option]
# Number of recent heights to keep on disk.
keep-recent = 2
# Height interval at which pruned heights are removed from disk.
interval = 100

# Pruning options for state commitment
[store.options.sc-pruning-option]
# Number of recent heights to keep on disk.
Expand Down
6 changes: 5 additions & 1 deletion tests/systemtests/staking_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ func TestStakeUnstake(t *testing.T) {
assert.Equal(t, int64(8999999), cli.QueryBalance(account1Addr, "stake"))

// check validator has been updated
rsp = cli.CustomQuery("q", "block-results", gjson.Get(rsp, "height").String())
if systest.IsV2() {
rsp = cli.CustomQuery("q", "comet", "block-results", gjson.Get(rsp, "height").String())
} else {
rsp = cli.CustomQuery("q", "block-results", gjson.Get(rsp, "height").String())
}
validatorUpdates := gjson.Get(rsp, "validator_updates").Array()
assert.NotEmpty(t, validatorUpdates)
vpk := gjson.Get(validatorUpdates[0].String(), "pub_key_bytes").String()
Expand Down
Loading