From 4cb22a31f7d09f610a89d33d8656509a31aa065c Mon Sep 17 00:00:00 2001 From: benesjan Date: Fri, 26 Jan 2024 13:34:07 +0000 Subject: [PATCH] fix --- yarn-project/circuits.js/src/structs/header.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/yarn-project/circuits.js/src/structs/header.ts b/yarn-project/circuits.js/src/structs/header.ts index 9580f70601e8..44b17a3009e7 100644 --- a/yarn-project/circuits.js/src/structs/header.ts +++ b/yarn-project/circuits.js/src/structs/header.ts @@ -30,11 +30,12 @@ export class Header { static fromBuffer(buffer: Buffer | BufferReader): Header { const reader = BufferReader.asReader(buffer); - // TODO(#4045): unify ordering here with ordering in constructor. - const globalVariables = reader.readObject(GlobalVariables); - const state = reader.readObject(StateReference); - const lastArchive = reader.readObject(AppendOnlyTreeSnapshot); - const bodyHash = reader.readBytes(NUM_BYTES_PER_SHA256); - return new Header(lastArchive, bodyHash, state, globalVariables); + + return new Header( + reader.readObject(AppendOnlyTreeSnapshot), + reader.readBytes(NUM_BYTES_PER_SHA256), + reader.readObject(StateReference), + reader.readObject(GlobalVariables), + ); } }