示例#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
}
示例#2
0
func (this *Context) PopBool() bool {
	return scriptint.Decode(this.Pop()).Sign() != 0
}
示例#3
0
func (this *Context) PopNumber() *big.Int {
	return scriptint.Decode(this.Pop())
}