Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed Jan 26, 2024
1 parent fed25e2 commit e01c2d7
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions yarn-project/circuits.js/src/structs/header.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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),
);
}
}

0 comments on commit e01c2d7

Please sign in to comment.