Skip to content

Commit

Permalink
change blsagg_test to use AdvanceChainByNBlocksExecInContainer fct wh…
Browse files Browse the repository at this point in the history
…ich doesn't need cast to be installed locally
  • Loading branch information
samlaf committed Jun 21, 2024
1 parent bd35584 commit c020d95
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion services/bls_aggregation/blsagg_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,7 @@ func TestIntegrationBlsAgg(t *testing.T) {
blsKeyPair, quorumNumbers, "socket",
)
require.NoError(t, err)
testutils.AdvanceChainByNBlocks(1, anvilHttpEndpoint)
testutils.AdvanceChainByNBlocksExecInContainer(context.TODO(), 1, anvilC)

curBlockNum, err = ethHttpClient.BlockNumber(context.Background())
referenceBlockNumber := uint32(curBlockNum) - 1
Expand Down
2 changes: 1 addition & 1 deletion testutils/anvil.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func AdvanceChainByNBlocks(n int, anvilEndpoint string) {
}
}

// AdvanceChainByNBlocks requires cast to be installed on the host machine, whereas this one doesn't.
// Prefer this function over AdvanceChainByNBlocks b/c it doesn't require cast to be installed on the host machine, whereas this one doesn't.
func AdvanceChainByNBlocksExecInContainer(ctx context.Context, n int, anvilC testcontainers.Container) {
c, _, err := anvilC.Exec(ctx, []string{"cast", "rpc", "anvil_mine", fmt.Sprintf("%d", n), "--rpc-url", "http://localhost:8545"})
if err != nil {
Expand Down

0 comments on commit c020d95

Please sign in to comment.