Example #1
0
func op_IFDUP(c *Context) error {
	top := c.Peek()
	if top == nil {
		return errors.New("Stack Underflow")
	}
	if scriptint.Decode(top).Sign() == 0 {
		c.Push(top)
	}
	return nil
}
Example #2
0
func (this *Context) PopBool() bool {
	return scriptint.Decode(this.Pop()).Sign() != 0
}
Example #3
0
func (this *Context) PopNumber() *big.Int {
	return scriptint.Decode(this.Pop())
}