From 61edc8705e7acfe60e04bcc0afee042911cb08b7 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Wed, 10 Jun 2020 17:24:48 +0300 Subject: [PATCH] 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. --- pkg/smartcontract/call_flags.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/smartcontract/call_flags.go b/pkg/smartcontract/call_flags.go index e8a070eaf..853448b87 100644 --- a/pkg/smartcontract/call_flags.go +++ b/pkg/smartcontract/call_flags.go @@ -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.