Skip to content

Commit

Permalink
fix: correct size in bytes of a complete address
Browse files Browse the repository at this point in the history
  • Loading branch information
olehmisar committed Aug 29, 2024
1 parent 2e1be18 commit 8dacebc
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 @@ -67,4 +67,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 @@ -28,7 +28,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 random(): CompleteAddress {
return this.fromSecretKeyAndPartialAddress(Fr.random(), Fr.random());
Expand Down

0 comments on commit 8dacebc

Please sign in to comment.