From f13166d17c56c1b1b246ed894206c2c5224a4d40 Mon Sep 17 00:00:00 2001 From: Paul Schaaf Date: Wed, 23 Mar 2022 18:08:32 -0400 Subject: [PATCH] add comment about anchors discriminator in space chapter --- src/chapter_5/space.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/chapter_5/space.md b/src/chapter_5/space.md index 598e54c..7fcbed8 100644 --- a/src/chapter_5/space.md +++ b/src/chapter_5/space.md @@ -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