From c43f0568b2c97d0ee7fabc1ff16272460e1faf4a Mon Sep 17 00:00:00 2001 From: Geoffrey Hayes Date: Tue, 16 Mar 2021 23:38:36 -0700 Subject: [PATCH] Add reporters manually back into chain spec --- integration/util/scenario/chain_spec.js | 13 ++++--------- integration/util/scenario/ctx.js | 4 ++++ integration/util/scenario/scen_info.js | 1 + 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/integration/util/scenario/chain_spec.js b/integration/util/scenario/chain_spec.js index cc4dbacd1..b2290ec9f 100644 --- a/integration/util/scenario/chain_spec.js +++ b/integration/util/scenario/chain_spec.js @@ -70,14 +70,7 @@ async function baseChainSpec(validatorsInfoHash, tokensInfoHash, ctx) { }; } - let palletSudo = {} - if (ctx.actors.first()) { - palletSudo = { - palletSudo: { - key: ctx.actors.first().chainKey.address - } - }; - } + let reporters = ctx.__reporters(); return { name: 'Integration Test Network', @@ -88,7 +81,6 @@ async function baseChainSpec(validatorsInfoHash, tokensInfoHash, ctx) { genesis: { runtime: { ...frameSystem, - ...palletSudo, palletCash: { assets, ...initialYieldConfig, @@ -96,6 +88,9 @@ async function baseChainSpec(validatorsInfoHash, tokensInfoHash, ctx) { }, palletSession: { keys: session_args + }, + palletOracle: { + reporters } } } diff --git a/integration/util/scenario/ctx.js b/integration/util/scenario/ctx.js index d7d24eb75..3b9875392 100644 --- a/integration/util/scenario/ctx.js +++ b/integration/util/scenario/ctx.js @@ -96,6 +96,10 @@ class Ctx { return process.env['OPF_URL'] ? process.env['OPF_URL'] : ( this.prices.serverUrl() || this.scenInfo['opf_url'] ); } + __reporters() { + return process.env['REPORTERS'] ? process.env['REPORTERS'].split(',') : this.scenInfo['reporters']; + } + debug(...msg) { debug(...msg); } diff --git a/integration/util/scenario/scen_info.js b/integration/util/scenario/scen_info.js index 8264b0e9a..a6d7a9adf 100644 --- a/integration/util/scenario/scen_info.js +++ b/integration/util/scenario/scen_info.js @@ -18,6 +18,7 @@ const baseScenInfo = { "wbtc", "usdc", ], + reporters: ["0xfceadafab14d46e20144f48824d0c09b1a03f2bc"], // [env=REPORTERS] eth_supply_cap: 1000000, eth_liquidity_factor: 0.7, chain_spec: { // TODO: Allow override of chain spec?