smartcontract: start flags with 1

`iota` keyword is equal to the index of the declaration in the
corresponding block, thus AllowStates was 2 in our case.
This commit is contained in:
Evgenii Stratonikov 2020-06-10 17:24:48 +03:00
parent 532262827d
commit 61edc8705e

View file

@ -5,13 +5,13 @@ type CallFlag byte
// Default flags.
const (
NoneFlag CallFlag = 0
AllowStates CallFlag = 1 << iota
AllowModifyStates
AllowCall
AllowNotify
ReadOnly = AllowStates | AllowCall | AllowNotify
All = ReadOnly | AllowModifyStates
ReadOnly = AllowStates | AllowCall | AllowNotify
All = ReadOnly | AllowModifyStates
NoneFlag CallFlag = 0
)
// Has returns true iff all bits set in cf are also set in f.