core: fix Storage.Get to return Null when there is no value

Match C# implementation and fix state inconsistency at block 249920 of
preview2 testnet. Make our Go Storage.Get return nil and adapt
examples/tests.
This commit is contained in:
Roman Khimov 2020-06-24 00:06:42 +03:00
parent 954c8ff8d6
commit d81d826bfc
9 changed files with 67 additions and 30 deletions

View file

@ -289,7 +289,7 @@ func storageGet(ic *interop.Context, v *vm.VM) error {
if si != nil && si.Value != nil {
v.Estack().PushVal(si.Value)
} else {
v.Estack().PushVal([]byte{})
v.Estack().PushVal(stackitem.Null{})
}
return nil
}