diff --git a/core/services/fluxmonitorv2/integrations_test.go b/core/services/fluxmonitorv2/integrations_test.go index e2344be3483..1d77b694cbe 100644 --- a/core/services/fluxmonitorv2/integrations_test.go +++ b/core/services/fluxmonitorv2/integrations_test.go @@ -55,9 +55,10 @@ const fee = int64(100) // Amount paid by FA contract, in LINK-wei const faTimeout = uint32(1) var pollTimerPeriod = 200 * time.Millisecond // if failing due to timeouts, increase this -var oneEth = big.NewInt(1000000000000000000) var emptyList = []common.Address{} +func oneEth() *big.Int { return big.NewInt(1000000000000000000) } + // fluxAggregatorUniverse represents the universe with which the aggregator // contract interacts type fluxAggregatorUniverse struct { @@ -162,7 +163,7 @@ func setupFluxAggregatorUniverse(t *testing.T, configOptions ...func(cfg *fluxAg f.sergey.GasLimit = oldGasLimit - _, err = f.linkContract.Transfer(f.sergey, f.aggregatorContractAddress, oneEth) // Actually, LINK + _, err = f.linkContract.Transfer(f.sergey, f.aggregatorContractAddress, oneEth()) // Actually, LINK require.NoError(t, err, "failed to fund FluxAggregator contract with LINK") f.backend.Commit() @@ -172,9 +173,9 @@ func setupFluxAggregatorUniverse(t *testing.T, configOptions ...func(cfg *fluxAg f.backend.Commit() availableFunds, err := f.aggregatorContract.AvailableFunds(nil) require.NoError(t, err, "failed to retrieve AvailableFunds") - require.Equal(t, availableFunds, oneEth) + require.Equal(t, availableFunds, oneEth()) - ilogs, err := f.aggregatorContract.FilterAvailableFundsUpdated(nil, []*big.Int{oneEth}) + ilogs, err := f.aggregatorContract.FilterAvailableFundsUpdated(nil, []*big.Int{oneEth()}) require.NoError(t, err, "failed to gather AvailableFundsUpdated logs") logs := cltest.GetLogs(t, nil, ilogs)