mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-03 11:41:48 +00:00
core/vm: implement contract storage and script retrieval
Fixes script invocations via the APPCALL instruction. Adjust contract state field types accordingly.
This commit is contained in:
parent
e83dc94744
commit
ceca9cdb67
6 changed files with 175 additions and 16 deletions
|
@ -1000,7 +1000,12 @@ func TestAppCall(t *testing.T) {
|
|||
prog = append(prog, byte(RET))
|
||||
|
||||
vm := load(prog)
|
||||
vm.scripts[hash] = makeProgram(DEPTH)
|
||||
vm.SetScriptGetter(func(in util.Uint160) []byte {
|
||||
if in.Equals(hash) {
|
||||
return makeProgram(DEPTH)
|
||||
}
|
||||
return nil
|
||||
})
|
||||
vm.estack.PushVal(2)
|
||||
|
||||
vm.Run()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue