Skip to content

Commit

Permalink
Add pretty-printed chainstate and set log message to only execute whe…
Browse files Browse the repository at this point in the history
…n verbose
  • Loading branch information
p-offtermatt committed Aug 21, 2023
1 parent 8c2c9b9 commit 1a40ca1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/e2e/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"time"

clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types"
"github.com/kylelemons/godebug/pretty"
"github.com/tidwall/gjson"
"gopkg.in/yaml.v2"
)
Expand Down Expand Up @@ -185,7 +186,9 @@ func (tr TestRun) getChainState(chain chainID, modelState ChainState) ChainState
chainState.RegisteredConsumerRewardDenoms = &registeredConsumerRewardDenoms
}

log.Println("Done getting chain state: ")
if *verbose {
log.Println("Done getting chain state:\n" + pretty.Sprint(chainState))
}

return chainState
}
Expand Down

0 comments on commit 1a40ca1

Please sign in to comment.