MCPcopy Index your code
hub / github.com/petertodd/python-bitcoinlib / _CastToBool

Function _CastToBool

bitcoin/core/scripteval.py:117–125  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

115 return v
116
117def _CastToBool(s):
118 for i in range(len(s)):
119 sv = s[i]
120 if sv != 0:
121 if (i == (len(s) - 1)) and (sv == 0x80):
122 return False
123 return True
124
125 return False
126
127
128def _CheckSig(sig, pubkey, script, txTo, inIdx, err_raiser):

Callers 2

_EvalScriptFunction · 0.85
VerifyScriptFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected