From db39d23b495c3b3abaa1efbf4a43355556857660 Mon Sep 17 00:00:00 2001 From: benesjan Date: Mon, 29 Jan 2024 13:05:28 +0000 Subject: [PATCH] buildInitialHeader func cleanup --- .../sequencer-client/src/sequencer/utils.ts | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/yarn-project/sequencer-client/src/sequencer/utils.ts b/yarn-project/sequencer-client/src/sequencer/utils.ts index 7681cfab0d2b..eebff558fea8 100644 --- a/yarn-project/sequencer-client/src/sequencer/utils.ts +++ b/yarn-project/sequencer-client/src/sequencer/utils.ts @@ -3,16 +3,10 @@ import { MerkleTreeOperations } from '@aztec/world-state'; /** * Builds the initial header by reading the roots from the database. + * + * TODO(#4148) Proper genesis state. If the state is empty, we allow anything for now. */ -export async function buildInitialHeader( - db: MerkleTreeOperations, - prevBlockGlobalVariables: GlobalVariables = GlobalVariables.empty(), // TODO(benesjan): this should most likely be removed -) { +export async function buildInitialHeader(db: MerkleTreeOperations) { const state = await db.getStateReference(); - return new Header( - AppendOnlyTreeSnapshot.empty(), // TODO(benesjan): is it correct that last archive is 0? - Buffer.alloc(32, 0), - state, - prevBlockGlobalVariables, - ); + return new Header(AppendOnlyTreeSnapshot.empty(), Buffer.alloc(32, 0), state, GlobalVariables.empty()); }