Skip to content

Commit

Permalink
fix(orchestrator): make genesis overrides first (#989)
Browse files Browse the repository at this point in the history
* fix(orchestrator): make genesis overrides first

* fmt
  • Loading branch information
pepoviola authored May 2, 2023
1 parent ac62cc2 commit 5e16cbc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
9 changes: 5 additions & 4 deletions javascript/packages/orchestrator/src/chainSpec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,11 @@ export async function customizePlainRelayChain(
? "session"
: "aura";

// make genesis overrides first.
if (networkSpec.relaychain.genesis) {
await changeGenesisConfig(specPath, networkSpec.relaychain.genesis);
}

// Clear all defaults
clearAuthorities(specPath);

Expand Down Expand Up @@ -707,10 +712,6 @@ export async function customizePlainRelayChain(
);
}

if (networkSpec.relaychain.genesis) {
await changeGenesisConfig(specPath, networkSpec.relaychain.genesis);
}

if (networkSpec.hrmp_channels) {
await addHrmpChannelsToGenesis(specPath, networkSpec.hrmp_channels);
}
Expand Down
7 changes: 4 additions & 3 deletions javascript/packages/orchestrator/src/paras.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ export async function generateParachainFiles(

writeChainSpec(chainSpecFullPathPlain, plainData);

// make genesis overrides first.
if (parachain.genesis)
await changeGenesisConfig(chainSpecFullPathPlain, parachain.genesis);

// clear auths
await clearAuthorities(chainSpecFullPathPlain);

Expand Down Expand Up @@ -137,9 +141,6 @@ export async function generateParachainFiles(
}
}

if (parachain.genesis)
await changeGenesisConfig(chainSpecFullPathPlain, parachain.genesis);

debug("creating chain spec raw");
// ensure needed file
if (parachain.chain)
Expand Down

0 comments on commit 5e16cbc

Please sign in to comment.