Skip to content

Commit

Permalink
fix: correct size in bytes of a complete address (#10574)
Browse files Browse the repository at this point in the history
This PR replaces #8282 as CI won't run for PRs from forks.

Co-authored-by: oleh <[email protected]>
  • Loading branch information
TomAFrench and olehmisar authored Dec 10, 2024
1 parent f18d701 commit e72b988
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions yarn-project/circuits.js/src/structs/complete_address.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,9 @@ describe('CompleteAddress', () => {

expect(completeAddressFromComponents.equals(completeAddressFromString)).toBe(true);
});

it('has correct size in bytes', () => {
const completeAddress = CompleteAddress.random();
expect(completeAddress.toBuffer().length).toBe(CompleteAddress.SIZE_IN_BYTES);
});
});
2 changes: 1 addition & 1 deletion yarn-project/circuits.js/src/structs/complete_address.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class CompleteAddress {
}

/** Size in bytes of an instance */
static readonly SIZE_IN_BYTES = 32 * 4;
static readonly SIZE_IN_BYTES = 32 * 10;

static get schema() {
return hexSchemaFor(CompleteAddress);
Expand Down

0 comments on commit e72b988

Please sign in to comment.