Skip to content

Commit ddae64d

Browse files
committed
Add an extra parameter for runtime config in NewCustomReusableCadenceRuntimePool constructor
Prior to this change, an empty `runtime.Config{}` was used and there was no way to set a custom config.
1 parent 99db13b commit ddae64d

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

engine/execution/computation/computer/computer_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,7 @@ func TestBlockExecutor_ExecuteBlock(t *testing.T) {
598598
fvm.WithReusableCadenceRuntimePool(
599599
reusableRuntime.NewCustomReusableCadenceRuntimePool(
600600
0,
601+
runtime.Config{},
601602
func(_ runtime.Config) runtime.Runtime {
602603
return emittingRuntime
603604
})))
@@ -685,6 +686,7 @@ func TestBlockExecutor_ExecuteBlock(t *testing.T) {
685686
fvm.WithReusableCadenceRuntimePool(
686687
reusableRuntime.NewCustomReusableCadenceRuntimePool(
687688
0,
689+
runtime.Config{},
688690
func(_ runtime.Config) runtime.Runtime {
689691
return rt
690692
})))
@@ -787,6 +789,7 @@ func TestBlockExecutor_ExecuteBlock(t *testing.T) {
787789
fvm.WithReusableCadenceRuntimePool(
788790
reusableRuntime.NewCustomReusableCadenceRuntimePool(
789791
0,
792+
runtime.Config{},
790793
func(_ runtime.Config) runtime.Runtime {
791794
return rt
792795
})))

fvm/environment/system_contracts_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ func TestSystemContractsInvoke(t *testing.T) {
5757
tracer := tracing.NewTracerSpan()
5858
runtimePool := reusableRuntime.NewCustomReusableCadenceRuntimePool(
5959
0,
60+
runtime.Config{},
6061
func(_ runtime.Config) runtime.Runtime {
6162
return &testutil.TestInterpreterRuntime{
6263
InvokeContractFunc: tc.contractFunction,

fvm/runtime/reusable_cadence_runtime.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,12 @@ func NewReusableCadenceRuntimePool(
146146

147147
func NewCustomReusableCadenceRuntimePool(
148148
poolSize int,
149+
config runtime.Config,
149150
newCustomRuntime CadenceRuntimeConstructor,
150151
) ReusableCadenceRuntimePool {
151152
return newReusableCadenceRuntimePool(
152153
poolSize,
153-
runtime.Config{},
154+
config,
154155
newCustomRuntime,
155156
)
156157
}

0 commit comments

Comments
 (0)