Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
acolytec3 committed Nov 18, 2024
1 parent bf1f019 commit 11ca85e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 7 additions & 1 deletion packages/client/bin/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,13 @@ async function startClient(
validateConsensus = true
}

const stateRoot = await generateVKTStateRoot(genesisMeta.genesisState, config.chainCommon)
let stateRoot
if (config.statefulVerkle) {
if (genesisMeta.genesisState === undefined) {
throw new Error('genesisState is required to compute stateRoot')
}
stateRoot = await generateVKTStateRoot(genesisMeta.genesisState, config.chainCommon)
}

blockchain = await createBlockchain({
db: new LevelDB(dbs.chainDB),
Expand Down
1 change: 0 additions & 1 deletion packages/client/src/util/vkt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export async function generateVKTStateRoot(genesisState: GenesisState, common: C
}
const address = createAddressFromString(addressStr)
await state.putAccount(address, new Account())
console.log(addressStr, addrState)
const codeBuf = hexToBytes((code as string) ?? '0x')
if (common.customCrypto?.keccak256 === undefined) {
throw Error('keccak256 required')
Expand Down

0 comments on commit 11ca85e

Please sign in to comment.