Changeset View
Changeset View
Standalone View
Standalone View
test/functional/test_framework/script.py
Show First 20 Lines • Show All 683 Lines • ▼ Show 20 Lines | def SignatureHash(script, txTo, inIdx, hashtype): | ||||
hash = hash256(s) | hash = hash256(s) | ||||
return (hash, None) | return (hash, None) | ||||
# TODO: Allow cached hashPrevouts/hashSequence/hashOutputs to be provided. | # TODO: Allow cached hashPrevouts/hashSequence/hashOutputs to be provided. | ||||
# Performance optimization probably not necessary for python tests, however. | # Performance optimization probably not necessary for python tests, however. | ||||
def SignatureHashForkId(script, txTo, inIdx, hashtype, amount): | def SignatureHashForkId(script, txTo, inIdx, hashtype, amount): | ||||
hashPrevouts = 0 | hashPrevouts = 0 | ||||
hashSequence = 0 | hashSequence = 0 | ||||
hashOutputs = 0 | hashOutputs = 0 | ||||
if not (hashtype & SIGHASH_ANYONECANPAY): | if not (hashtype & SIGHASH_ANYONECANPAY): | ||||
serialize_prevouts = bytes() | serialize_prevouts = bytes() | ||||
Show All 32 Lines |