Skip to content
This repository has been archived by the owner on Aug 1, 2023. It is now read-only.

Commit

Permalink
Add reporters manually back into chain spec
Browse files Browse the repository at this point in the history
  • Loading branch information
hayesgm committed Mar 17, 2021
1 parent 1a75509 commit c43f056
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
13 changes: 4 additions & 9 deletions integration/util/scenario/chain_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -88,14 +81,16 @@ async function baseChainSpec(validatorsInfoHash, tokensInfoHash, ctx) {
genesis: {
runtime: {
...frameSystem,
...palletSudo,
palletCash: {
assets,
...initialYieldConfig,
validators,
},
palletSession: {
keys: session_args
},
palletOracle: {
reporters
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions integration/util/scenario/ctx.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
1 change: 1 addition & 0 deletions integration/util/scenario/scen_info.js
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down

0 comments on commit c43f056

Please sign in to comment.