PopBool pops the value off the top of the stack, converts it into a bool, and returns it. Stack transformation: [... x1 x2 x3] -> [... x1 x2]
()
| 94 | // |
| 95 | // Stack transformation: [... x1 x2 x3] -> [... x1 x2] |
| 96 | func (s *stack) PopBool() (bool, error) { |
| 97 | so, err := s.PopByteArray() |
| 98 | if err != nil { |
| 99 | return false, err |
| 100 | } |
| 101 | |
| 102 | return asBool(so), nil |
| 103 | } |
| 104 | |
| 105 | // PeekByteArray returns the Nth item on the stack without removing it. |
| 106 | func (s *stack) PeekByteArray(idx int32) ([]byte, error) { |