Browse Source

docs: Fix misleading (#579)

Yihau Chen 4 years ago
parent
commit
f6329ceef1
1 changed files with 2 additions and 1 deletions
  1. 2 1
      docs/src/tutorials/tutorial-1.md

+ 2 - 1
docs/src/tutorials/tutorial-1.md

@@ -56,7 +56,8 @@ allowing you to omit the `Rent` acccount), you can specify
 ::: details
 All accounts created with Anchor are laid out as follows: `8-byte-discriminator || borsh
 serialized data`. The 8-byte-discriminator is created from the first 8 bytes of the
-`Sha256` hash of the account's type--using the example above, `sha256("MyAccount")[..8]`.
+`Sha256` hash of the account's type--using the example above, `sha256("account:MyAccount")[..8]`.
+The `account:` is a fixed prefix.
 
 Importantly, this allows a program to know for certain an account is indeed of a given type.
 Without it, a program would be vulnerable to account injection attacks, where a malicious user