Refactor PushNBytes Opcode
This commit is contained in:
parent
7b519eba0d
commit
c7e32e7eb3
1 changed files with 3 additions and 3 deletions
|
@ -7,13 +7,13 @@ import (
|
|||
// Stack Manipulation Opcodes
|
||||
|
||||
// PushNBytes will Read N Bytes from the script and push it onto the stack
|
||||
func PushNBytes(op stack.Instruction, ctx *stack.Context, istack *stack.Invocation) error {
|
||||
func PushNBytes(op stack.Instruction, ctx *stack.Context, istack *stack.Invocation) (Vmstate, error) {
|
||||
|
||||
val, err := ctx.ReadBytes(int(op))
|
||||
if err != nil {
|
||||
return err
|
||||
return FAULT, err
|
||||
}
|
||||
ba := stack.NewByteArray(val)
|
||||
ctx.Estack.Push(ba)
|
||||
return nil
|
||||
return NONE, nil
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue