vm: replace hardcoded Bool type constant with BooleanT type

There's no import cycle problem anymore, so we can do this. Part of #912
This commit is contained in:
Anna Shaleva 2020-06-03 21:16:19 +03:00
parent 7ca2807875
commit d0ccf456c4

View file

@ -12,6 +12,7 @@ import (
"github.com/nspcc-dev/neo-go/pkg/io"
"github.com/nspcc-dev/neo-go/pkg/util"
"github.com/nspcc-dev/neo-go/pkg/vm/opcode"
"github.com/nspcc-dev/neo-go/pkg/vm/stackitem"
)
// Instruction emits a VM Instruction with data to the given buffer.
@ -32,7 +33,7 @@ func Bool(w *io.BinWriter, ok bool) {
return
}
Opcode(w, opcode.PUSHF)
Instruction(w, opcode.CONVERT, []byte{0x20}) // 0x20 for Boolean type
Instruction(w, opcode.CONVERT, []byte{byte(stackitem.BooleanT)})
}
func padRight(s int, buf []byte) []byte {