mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-23 03:38:35 +00:00
vm: update bool -> []byte conversion to NEO 3
This reverts commit 4c688355bc
.
This commit is contained in:
parent
2fd26287c5
commit
5dba30a49d
2 changed files with 2 additions and 6 deletions
|
@ -341,9 +341,7 @@ func (i *BoolItem) Bytes() []byte {
|
||||||
if i.value {
|
if i.value {
|
||||||
return []byte{1}
|
return []byte{1}
|
||||||
}
|
}
|
||||||
// return []byte{0}
|
return []byte{0}
|
||||||
// FIXME revert when NEO 3.0 https://github.com/nspcc-dev/neo-go/issues/477
|
|
||||||
return []byte{}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TryBytes implements StackItem interface.
|
// TryBytes implements StackItem interface.
|
||||||
|
|
|
@ -1505,9 +1505,7 @@ func TestSIZEBool(t *testing.T) {
|
||||||
vm.estack.PushVal(false)
|
vm.estack.PushVal(false)
|
||||||
runVM(t, vm)
|
runVM(t, vm)
|
||||||
assert.Equal(t, 1, vm.estack.Len())
|
assert.Equal(t, 1, vm.estack.Len())
|
||||||
// assert.Equal(t, makeStackItem(1), vm.estack.Pop().value)
|
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)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestARRAYSIZEArray(t *testing.T) {
|
func TestARRAYSIZEArray(t *testing.T) {
|
||||||
|
|
Loading…
Reference in a new issue