forked from TrueCloudLab/neoneo-go
transaction: fix Rules stringer, it's WitnessRules in C#
See neo-project/neo#2720.
This commit is contained in:
parent
7b1943a6e5
commit
bd352daab4
3 changed files with 5 additions and 5 deletions
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue