Changeset View
Changeset View
Standalone View
Standalone View
test/functional/test_framework/script.py
Show First 20 Lines • Show All 526 Lines • ▼ Show 20 Lines | def raw_iter(self): | ||||
else: | else: | ||||
assert False # shouldn't happen | assert False # shouldn't happen | ||||
data = bytes(self[i:i + datasize]) | data = bytes(self[i:i + datasize]) | ||||
# Check for truncation | # Check for truncation | ||||
if len(data) < datasize: | if len(data) < datasize: | ||||
raise CScriptTruncatedPushDataError( | raise CScriptTruncatedPushDataError( | ||||
'{}: truncated data'.format(pushdata_type, data)) | '{}: truncated data'.format(pushdata_type), data) | ||||
i += datasize | i += datasize | ||||
yield (opcode, data, sop_idx) | yield (opcode, data, sop_idx) | ||||
def __iter__(self): | def __iter__(self): | ||||
"""'Cooked' iteration | """'Cooked' iteration | ||||
▲ Show 20 Lines • Show All 189 Lines • Show Last 20 Lines |