Skip to content

Commit e72b988

Browse files
fix: correct size in bytes of a complete address (#10574)
This PR replaces #8282 as CI won't run for PRs from forks. Co-authored-by: oleh <olehmisar@gmail.com>
1 parent f18d701 commit e72b988

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

yarn-project/circuits.js/src/structs/complete_address.test.ts

+5
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,9 @@ describe('CompleteAddress', () => {
6565

6666
expect(completeAddressFromComponents.equals(completeAddressFromString)).toBe(true);
6767
});
68+
69+
it('has correct size in bytes', () => {
70+
const completeAddress = CompleteAddress.random();
71+
expect(completeAddress.toBuffer().length).toBe(CompleteAddress.SIZE_IN_BYTES);
72+
});
6873
});

yarn-project/circuits.js/src/structs/complete_address.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export class CompleteAddress {
3030
}
3131

3232
/** Size in bytes of an instance */
33-
static readonly SIZE_IN_BYTES = 32 * 4;
33+
static readonly SIZE_IN_BYTES = 32 * 10;
3434

3535
static get schema() {
3636
return hexSchemaFor(CompleteAddress);

0 commit comments

Comments
 (0)