Skip to content

Commit

Permalink
Build first block for genesis (#627)
Browse files Browse the repository at this point in the history
  • Loading branch information
ermalkaleci committed Jan 10, 2024
1 parent d7b476e commit d7b3fab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions packages/core/src/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ export const genesisSetup = async (chain: Blockchain, genesis: GenesisProvider)
const digest = meta.registry.createType<DigestItem>('DigestItem', { PreRuntime: [consensusEngine, newSlot] })
genesis.genesisHeaderLogs = [digest.toHex()]
}

await chain.newBlock()
}

export const setup = async (options: SetupOptions) => {
Expand Down
4 changes: 2 additions & 2 deletions packages/e2e/src/__snapshots__/genesis-provider.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ exports[`genesis provider works Kusama > genesis provider works > handles tx 2`]
"consumers": 0,
"data": {
"flags": "0x80000000000000000000000000000000",
"free": 876999432127266,
"free": 876999432128101,
"frozen": 0,
"reserved": 0,
},
Expand Down Expand Up @@ -71,7 +71,7 @@ exports[`genesis provider works Mandala > genesis provider works > handles tx 2`
"consumers": 0,
"data": {
"feeFrozen": 0,
"free": 876982732391839,
"free": 876982732395758,
"miscFrozen": 0,
"reserved": 0,
},
Expand Down

0 comments on commit d7b3fab

Please sign in to comment.