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
|
* 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) {
|
func TestStorageFind(t *testing.T) {
|
||||||
v, contractState, context, chain := createVMAndContractState(t)
|
v, contractState, context, chain := createVMAndContractState(t)
|
||||||
defer chain.Close()
|
defer chain.Close()
|
||||||
|
|
|
@ -288,7 +288,7 @@ func (ic *interopContext) runtimePlatform(v *vm.VM) error {
|
||||||
|
|
||||||
// runtimeGetTrigger returns the script trigger.
|
// runtimeGetTrigger returns the script trigger.
|
||||||
func (ic *interopContext) runtimeGetTrigger(v *vm.VM) error {
|
func (ic *interopContext) runtimeGetTrigger(v *vm.VM) error {
|
||||||
v.Estack().PushVal(ic.trigger)
|
v.Estack().PushVal(byte(ic.trigger))
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue