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:
parent
954c8ff8d6
commit
d81d826bfc
9 changed files with 67 additions and 30 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue