Skip to content

Commit

Permalink
buildInitialHeader func cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed Jan 29, 2024
1 parent 3cf91d2 commit db39d23
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions yarn-project/sequencer-client/src/sequencer/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}

0 comments on commit db39d23

Please sign in to comment.