MCPcopy Index your code
hub / github.com/btcsuite/btcd / PeekBool

Method PeekBool

txscript/stack.go:130–137  ·  view source on GitHub ↗

PeekBool returns the Nth item on the stack as a bool without removing it.

(idx int32)

Source from the content-addressed store, hash-verified

128
129// PeekBool returns the Nth item on the stack as a bool without removing it.
130func (s *stack) PeekBool(idx int32) (bool, error) {
131 so, err := s.PeekByteArray(idx)
132 if err != nil {
133 return false, err
134 }
135
136 return asBool(so), nil
137}
138
139// nipN is an internal function that removes the nth item on the stack and
140// returns it.

Callers 1

TestStackFunction · 0.95

Calls 2

PeekByteArrayMethod · 0.95
asBoolFunction · 0.85

Tested by 1

TestStackFunction · 0.76