Skip to content

Commit

Permalink
test(systemtests): fix query block-results in TestStakeUnstake for v2…
Browse files Browse the repository at this point in the history
… (backport #22782) (#22784)

Co-authored-by: mmsqe <mavis@crypto.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
  • Loading branch information
3 people authored Dec 6, 2024
1 parent 8b4dd8e commit b37887e
Showing 1 changed file with 5 additions and 1 deletion.
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

0 comments on commit b37887e

Please sign in to comment.