Skip to content

Commit

Permalink
Peek result on evaluation stack
Browse files Browse the repository at this point in the history
  • Loading branch information
tk-codes committed Mar 21, 2019
1 parent 6cdf014 commit 923574a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions vm/vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -1175,6 +1175,10 @@ func (vm *VM) PopUnsignedBigInt(opCode OpCode) (bigInt big.Int, err error) {
return result, err
}

func (vm *VM) PeekResult() (element []byte, err error) {
return vm.evaluationStack.PeekBytes()
}

func (vm *VM) GetErrorMsg() string {
tos, err := vm.evaluationStack.PeekBytes()
if err != nil {
Expand Down

0 comments on commit 923574a

Please sign in to comment.