diff --git a/tests/e2e/state.go b/tests/e2e/state.go index c23e0d35e3..a517cd40ef 100644 --- a/tests/e2e/state.go +++ b/tests/e2e/state.go @@ -19,7 +19,7 @@ type State map[ChainID]ChainState type ChainState struct { ValBalances *map[ValidatorID]uint Proposals *map[uint]Proposal - ProposedConsumerChains []string + ProposedConsumerChains *[]string ValPowers *map[ValidatorID]uint RepresentativePowers *map[ValidatorID]uint Params *[]Param @@ -135,7 +135,7 @@ func (tr TestRun) getChainState(chain ChainID, modelState ChainState) ChainState if modelState.ProposedConsumerChains != nil { proposedConsumerChains := tr.getProposedConsumerChains(chain) - chainState.ProposedConsumerChains = proposedConsumerChains + chainState.ProposedConsumerChains = &proposedConsumerChains } if modelState.ValPowers != nil { @@ -780,9 +780,9 @@ func (tr TestRun) curlJsonRPCRequest(method, params, address string) { } -func (tr TestRun) getProposedConsumerChains(chain chainID) []string { - bz, err := exec.Command("docker", "exec", tr.containerConfig.instanceName, tr.chainConfigs[chain].binaryName, - +func (tr TestRun) getProposedConsumerChains(chain ChainID) []string { + tr.waitBlocks(chain, 1, 10*time.Second) + bz, err := exec.Command("docker", "exec", tr.containerConfig.InstanceName, tr.chainConfigs[chain].BinaryName, "query", "provider", "list-proposed-consumer-chains", `--node`, tr.getQueryNode(chain), `-o`, `json`, diff --git a/tests/e2e/steps_start_chains.go b/tests/e2e/steps_start_chains.go index 253a0afb53..ec75b71abc 100644 --- a/tests/e2e/steps_start_chains.go +++ b/tests/e2e/steps_start_chains.go @@ -22,7 +22,6 @@ func stepStartProviderChain() []Step { ValidatorID("bob"): 9500000000, ValidatorID("carol"): 9500000000, }, - ProposedConsumerChains: []string{}, }, }, }, @@ -55,7 +54,7 @@ func stepsStartConsumerChain(consumerName string, proposalIndex, chainIndex uint Status: "PROPOSAL_STATUS_VOTING_PERIOD", }, }, - ProposedConsumerChains: []string{consumerName}, + ProposedConsumerChains: &[]string{consumerName}, }, }, }, @@ -135,10 +134,9 @@ func stepsStartConsumerChain(consumerName string, proposalIndex, chainIndex uint Status: "PROPOSAL_STATUS_PASSED", }, }, - ProposedConsumerChains: []string{}, - ValBalances: &map[validatorID]uint{ - validatorID("alice"): 9500000000, - validatorID("bob"): 9500000000, + ValBalances: &map[ValidatorID]uint{ + ValidatorID("alice"): 9500000000, + ValidatorID("bob"): 9500000000, }, }, },