forked from TrueCloudLab/neoneo-go
core: convert trigger.Type to byte when pushing on stack
This commit is contained in:
parent
3282c6ed41
commit
fe3bbbd78a
2 changed files with 7 additions and 1 deletions
|
@ -35,6 +35,12 @@ import (
|
|||
* TestRuntimeDeserialize
|
||||
*/
|
||||
|
||||
func TestGetTrigger(t *testing.T) {
|
||||
v, _, context, chain := createVMAndPushBlock(t)
|
||||
defer chain.Close()
|
||||
require.NoError(t, context.runtimeGetTrigger(v))
|
||||
}
|
||||
|
||||
func TestStorageFind(t *testing.T) {
|
||||
v, contractState, context, chain := createVMAndContractState(t)
|
||||
defer chain.Close()
|
||||
|
|
|
@ -288,7 +288,7 @@ func (ic *interopContext) runtimePlatform(v *vm.VM) error {
|
|||
|
||||
// runtimeGetTrigger returns the script trigger.
|
||||
func (ic *interopContext) runtimeGetTrigger(v *vm.VM) error {
|
||||
v.Estack().PushVal(ic.trigger)
|
||||
v.Estack().PushVal(byte(ic.trigger))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue