From 24c81d0afbdd15d7145a6ed765ad3908345e5c4d Mon Sep 17 00:00:00 2001 From: Chan-Ho Suh Date: Sat, 22 Jul 2023 14:18:15 -0400 Subject: [PATCH] Fix collision between fixed params and defaults When there are no variable params and only fixed params for A and fee, the defaults will override the fixed params. Deleting from the defaults if it's in the fixed params will handle any possible collision. --- curvesim/pipelines/vol_limited_arb/__init__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/curvesim/pipelines/vol_limited_arb/__init__.py b/curvesim/pipelines/vol_limited_arb/__init__.py index daa0fae46..0e4892633 100644 --- a/curvesim/pipelines/vol_limited_arb/__init__.py +++ b/curvesim/pipelines/vol_limited_arb/__init__.py @@ -115,7 +115,12 @@ def pipeline( cpu_count = os.cpu_count() ncpu = cpu_count if cpu_count is not None else 1 - variable_params = variable_params or DEFAULT_PARAMS + default_params = DEFAULT_PARAMS.copy() + for key in default_params: + if key in fixed_params: + del default_params[key] + + variable_params = variable_params or default_params metrics = metrics or DEFAULT_METRICS if pool_data_cache is None: