diff --git a/services/bls_aggregation/blsagg_test.go b/services/bls_aggregation/blsagg_test.go index c87159d9..ed7c45b8 100644 --- a/services/bls_aggregation/blsagg_test.go +++ b/services/bls_aggregation/blsagg_test.go @@ -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 diff --git a/testutils/anvil.go b/testutils/anvil.go index c8a084e5..f7fb6d20 100644 --- a/testutils/anvil.go +++ b/testutils/anvil.go @@ -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 {