mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-27 05:42:56 +00:00
smartcontract: update trigger.Type stringer
We have to explicitly specify the type of `All` trigger type for proper automatic generation of string representation.
This commit is contained in:
parent
d40a730e5a
commit
34df5d5949
2 changed files with 5 additions and 1 deletions
|
@ -25,5 +25,5 @@ const (
|
|||
Application Type = 0x40
|
||||
|
||||
// All represents any trigger type.
|
||||
All = System | Verification | Application
|
||||
All Type = System | Verification | Application
|
||||
)
|
||||
|
|
|
@ -11,12 +11,14 @@ func _() {
|
|||
_ = x[System-1]
|
||||
_ = x[Verification-32]
|
||||
_ = x[Application-64]
|
||||
_ = x[All-97]
|
||||
}
|
||||
|
||||
const (
|
||||
_Type_name_0 = "System"
|
||||
_Type_name_1 = "Verification"
|
||||
_Type_name_2 = "Application"
|
||||
_Type_name_3 = "All"
|
||||
)
|
||||
|
||||
func (i Type) String() string {
|
||||
|
@ -27,6 +29,8 @@ func (i Type) String() string {
|
|||
return _Type_name_1
|
||||
case i == 64:
|
||||
return _Type_name_2
|
||||
case i == 97:
|
||||
return _Type_name_3
|
||||
default:
|
||||
return "Type(" + strconv.FormatInt(int64(i), 10) + ")"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue