Skip to content

Commit

Permalink
Adapt local-v and mainnet-local-v to collatorStaking
Browse files Browse the repository at this point in the history
  • Loading branch information
Moliholy committed Aug 21, 2024
1 parent a5dd877 commit ff74623
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,10 @@ export async function addCollatorSelection(specPath: string, node: Node) {
try {
const chainSpec = readAndParseChainSpec(specPath);
const runtimeConfig = getRuntimeConfig(chainSpec);
if (!runtimeConfig?.collatorSelection?.invulnerables) return;

const { eth_account } = node.accounts;

if (runtimeConfig.collatorSelection)
runtimeConfig.collatorSelection.invulnerables.push(eth_account.address);
if (runtimeConfig.collatorStaking)
runtimeConfig.collatorStaking.invulnerables.push(eth_account.address);
runtimeConfig?.collatorSelection?.invulnerables?.push(eth_account.address);
runtimeConfig?.collatorStaking?.invulnerables?.push(eth_account.address);

new CreateLogTable({
colWidths: [30, 20, 70],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,10 @@ export async function addCollatorSelection(specPath: string, node: Node) {
try {
const chainSpec = readAndParseChainSpec(specPath);
const runtimeConfig = getRuntimeConfig(chainSpec);
if (!runtimeConfig?.collatorSelection?.invulnerables) return;

const { eth_account } = node.accounts;

runtimeConfig.collatorSelection.invulnerables.push(eth_account.address);
runtimeConfig?.collatorSelection?.invulnerables?.push(eth_account.address);
runtimeConfig?.collatorStaking?.invulnerables?.push(eth_account.address);

new CreateLogTable({
colWidths: [30, 20, 70],
Expand Down

0 comments on commit ff74623

Please sign in to comment.