Skip to content

Commit

Permalink
Update job spec tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vreff committed Mar 8, 2023
1 parent 903b8ce commit 73b996a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions core/testdata/testspecs/v2_specs.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,12 @@ func GenerateVRFSpec(params VRFSpecParams) VRFSpec {
if params.BatchCoordinatorAddress != "" {
batchCoordinatorAddress = params.BatchCoordinatorAddress
}

fromAddresses := []string{"0x5C7B1d96CA3132576A84423f624C2c492f668Fea"}
if len(params.FromAddresses) != 0 {
fromAddresses = params.FromAddresses
}

batchFulfillmentGasMultiplier := 1.0
if params.BatchFulfillmentGasMultiplier >= 1.0 {
batchFulfillmentGasMultiplier = params.BatchFulfillmentGasMultiplier
Expand Down Expand Up @@ -363,9 +369,9 @@ observationSource = """
params.BatchFulfillmentEnabled, strconv.FormatFloat(batchFulfillmentGasMultiplier, 'f', 2, 64),
confirmations, params.RequestedConfsDelay, requestTimeout.String(), publicKey, chunkSize,
params.BackoffInitialDelay.String(), params.BackoffMaxDelay.String(), gasLanePrice.String(), observationSource)
if len(params.FromAddresses) != 0 {
if len(fromAddresses) != 0 {
var addresses []string
for _, address := range params.FromAddresses {
for _, address := range fromAddresses {
addresses = append(addresses, fmt.Sprintf("%q", address))
}
toml = toml + "\n" + fmt.Sprintf(`fromAddresses = [%s]`, strings.Join(addresses, ", "))
Expand All @@ -374,6 +380,7 @@ observationSource = """
return VRFSpec{VRFSpecParams: VRFSpecParams{
JobID: jobID,
Name: name,
FromAddresses: fromAddresses,
CoordinatorAddress: coordinatorAddress,
BatchCoordinatorAddress: batchCoordinatorAddress,
BatchFulfillmentEnabled: params.BatchFulfillmentEnabled,
Expand Down

0 comments on commit 73b996a

Please sign in to comment.