diff --git a/pkg/core/transaction/witness_scope.go b/pkg/core/transaction/witness_scope.go index 8950290cd..f4d75157e 100644 --- a/pkg/core/transaction/witness_scope.go +++ b/pkg/core/transaction/witness_scope.go @@ -1,6 +1,6 @@ package transaction -//go:generate stringer -type=WitnessScope -output=witness_scope_string.go +//go:generate stringer -type=WitnessScope -linecomment -output=witness_scope_string.go import ( "encoding/json" "fmt" @@ -23,7 +23,7 @@ const ( // CustomGroups define custom pubkey for group members. CustomGroups WitnessScope = 0x20 // Rules is a set of conditions with boolean operators. - Rules WitnessScope = 0x40 + Rules WitnessScope = 0x40 // WitnessRules // Global allows this witness in all contexts (default Neo2 behavior). // This cannot be combined with other flags. Global WitnessScope = 0x80 diff --git a/pkg/core/transaction/witness_scope_string.go b/pkg/core/transaction/witness_scope_string.go index 5f6666af1..805ac1473 100644 --- a/pkg/core/transaction/witness_scope_string.go +++ b/pkg/core/transaction/witness_scope_string.go @@ -1,4 +1,4 @@ -// Code generated by "stringer -type=WitnessScope -output=witness_scope_string.go"; DO NOT EDIT. +// Code generated by "stringer -type=WitnessScope -linecomment -output=witness_scope_string.go"; DO NOT EDIT. package transaction @@ -20,7 +20,7 @@ const ( _WitnessScope_name_0 = "NoneCalledByEntry" _WitnessScope_name_1 = "CustomContracts" _WitnessScope_name_2 = "CustomGroups" - _WitnessScope_name_3 = "Rules" + _WitnessScope_name_3 = "WitnessRules" _WitnessScope_name_4 = "Global" ) diff --git a/pkg/network/message_string.go b/pkg/network/message_string.go index 2ebdacd9b..8e516f377 100644 --- a/pkg/network/message_string.go +++ b/pkg/network/message_string.go @@ -62,7 +62,7 @@ var ( func (i CommandType) String() string { switch { - case i <= 1: + case 0 <= i && i <= 1: return _CommandType_name_0[_CommandType_index_0[i]:_CommandType_index_0[i+1]] case 16 <= i && i <= 17: i -= 16