Skip to content

Commit

Permalink
chore: expose validator key funcs, increase gas (#868)
Browse files Browse the repository at this point in the history
* chore: expose validator key funcs, increase gas

* chore: update

* chore: small fix
  • Loading branch information
johnletey authored Nov 9, 2023
1 parent 6c5ef21 commit ba30bbf
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ concurrency:
jobs:
test-conformance:
name: test-conformance
runs-on: [self-hosted, linux]
runs-on: ubuntu-latest
steps:
# Install and setup go
- name: Set up Go 1.19
Expand All @@ -32,7 +32,7 @@ jobs:
run: (go test -race -timeout 30m -failfast -v -p 2 ./cmd/interchaintest) || (echo "\n\n*****CHAIN and RELAYER LOGS*****" && cat "$HOME/.interchaintest/logs/interchaintest.log" && exit 1)
test-ibc-examples:
name: test-ibc-examples
runs-on: [self-hosted, linux]
runs-on: ubuntu-latest
steps:
# Install and setup go
- name: Set up Go 1.19
Expand All @@ -54,7 +54,7 @@ jobs:
run: go test -race -timeout 30m -failfast -v -p 2 ./examples/ibc
test-cosmos-examples:
name: test-cosmos-examples
runs-on: [self-hosted, linux]
runs-on: ubuntu-latest
steps:
# Install and setup go
- name: Set up Go 1.19
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ concurrency:
jobs:
test-unit:
name: unit-tests
runs-on: [self-hosted, linux]
runs-on: ubuntu-latest
steps:
# Install and setup go
- name: Set up Go 1.19
Expand Down
6 changes: 3 additions & 3 deletions chain/cosmos/chain_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ func (tn *ChainNode) copyGentx(ctx context.Context, destVal *ChainNode) error {
return nil
}

func (tn *ChainNode) privValFileContent(ctx context.Context) ([]byte, error) {
func (tn *ChainNode) PrivValFileContent(ctx context.Context) ([]byte, error) {
fr := dockerutil.NewFileRetriever(tn.logger(), tn.DockerClient, tn.TestName)
gen, err := fr.SingleFileContent(ctx, tn.VolumeName, "config/priv_validator_key.json")
if err != nil {
Expand All @@ -205,7 +205,7 @@ func (tn *ChainNode) privValFileContent(ctx context.Context) ([]byte, error) {
return gen, nil
}

func (tn *ChainNode) overwritePrivValFile(ctx context.Context, content []byte) error {
func (tn *ChainNode) OverwritePrivValFile(ctx context.Context, content []byte) error {
fw := dockerutil.NewFileWriter(tn.logger(), tn.DockerClient, tn.TestName)
if err := fw.WriteFile(ctx, tn.VolumeName, "config/priv_validator_key.json", content); err != nil {
return fmt.Errorf("overwriting priv_validator_key.json: %w", err)
Expand Down Expand Up @@ -893,7 +893,7 @@ func (tn *ChainNode) QueryClientContractCode(ctx context.Context, codeHash strin
func (tn *ChainNode) VoteOnProposal(ctx context.Context, keyName string, proposalID string, vote string) error {
_, err := tn.ExecTx(ctx, keyName,
"gov", "vote",
proposalID, vote, "--gas", "auto",
proposalID, vote, "--gas", "250000",
)
return err
}
Expand Down
4 changes: 2 additions & 2 deletions chain/cosmos/cosmos_chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -1003,11 +1003,11 @@ func (c *CosmosChain) StartConsumer(testName string, ctx context.Context, additi

// Copy provider priv val keys to these nodes
for i, val := range c.Provider.Validators {
privVal, err := val.privValFileContent(ctx)
privVal, err := val.PrivValFileContent(ctx)
if err != nil {
return err
}
if err := c.Validators[i].overwritePrivValFile(ctx, privVal); err != nil {
if err := c.Validators[i].OverwritePrivValFile(ctx, privVal); err != nil {
return err
}
}
Expand Down

0 comments on commit ba30bbf

Please sign in to comment.