vm: update bool -> []byte conversion to NEO 3

This reverts commit 4c688355bc.
This commit is contained in:
Evgenii Stratonikov 2020-04-15 16:19:42 +03:00
parent 2fd26287c5
commit 5dba30a49d
2 changed files with 2 additions and 6 deletions

View file

@ -341,9 +341,7 @@ func (i *BoolItem) Bytes() []byte {
if i.value {
return []byte{1}
}
// return []byte{0}
// FIXME revert when NEO 3.0 https://github.com/nspcc-dev/neo-go/issues/477
return []byte{}
return []byte{0}
}
// TryBytes implements StackItem interface.

View file

@ -1505,9 +1505,7 @@ func TestSIZEBool(t *testing.T) {
vm.estack.PushVal(false)
runVM(t, vm)
assert.Equal(t, 1, vm.estack.Len())
// assert.Equal(t, makeStackItem(1), vm.estack.Pop().value)
// FIXME revert when NEO 3.0 https://github.com/nspcc-dev/neo-go/issues/477
assert.Equal(t, makeStackItem(0), vm.estack.Pop().value)
assert.Equal(t, makeStackItem(1), vm.estack.Pop().value)
}
func TestARRAYSIZEArray(t *testing.T) {