add comment about anchors discriminator in space chapter

This commit is contained in:
Paul Schaaf 2022-03-23 18:08:32 -04:00
parent c032d12e35
commit f13166d17c
No known key found for this signature in database
GPG Key ID: 832D12D4356B4331
1 changed files with 2 additions and 0 deletions

View File

@ -2,6 +2,8 @@
This reference tells you how much space you should allocate for an account.
In addition to the space for the account data, you have to add `8` to the `space` constraint for Anchor's internal discriminator (see the example).
| Types | Space in bytes | Details/Example
| --------------- | -------------------- | -----------
| bool | 1 | would only require 1 bit but still uses 1 byte