mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-27 13:58:05 +00:00
48413900ca
Expose underlying with Getter on Boolean StackItem Add Equals method for ByteArray
26 lines
509 B
Go
26 lines
509 B
Go
package stack
|
|
|
|
// Boolean represents a boolean value on the stack
|
|
type Boolean struct {
|
|
*abstractItem
|
|
val bool
|
|
}
|
|
|
|
//NewBoolean returns a new boolean stack item
|
|
func NewBoolean(val bool) *Boolean {
|
|
return &Boolean{
|
|
&abstractItem{},
|
|
val,
|
|
}
|
|
}
|
|
|
|
// Boolean overrides the default implementation
|
|
// by the abstractItem, returning a Boolean struct
|
|
func (b *Boolean) Boolean() (*Boolean, error) {
|
|
return b, nil
|
|
}
|
|
|
|
// Value returns the underlying boolean value
|
|
func (b *Boolean) Value() bool {
|
|
return b.val
|
|
}
|