ZIP 244: Change semantics of sequence_sig_digest
This commit is contained in:
parent
61894e7793
commit
29872dcaa0
|
@ -261,13 +261,8 @@ def prevouts_sig_digest(tx, nHashType):
|
||||||
return blake2b(digest_size=32, person=b'ZTxIdPrevoutHash').digest()
|
return blake2b(digest_size=32, person=b'ZTxIdPrevoutHash').digest()
|
||||||
|
|
||||||
def sequence_sig_digest(tx, nHashType):
|
def sequence_sig_digest(tx, nHashType):
|
||||||
# if the SIGHASH_ANYONECANPAY flag is not set, and the sighash type is neither
|
# if the SIGHASH_ANYONECANPAY flag is not set:
|
||||||
# SIGHASH_SINGLE nor SIGHASH_NONE:
|
if not (nHashType & SIGHASH_ANYONECANPAY):
|
||||||
if (
|
|
||||||
(not (nHashType & SIGHASH_ANYONECANPAY)) and \
|
|
||||||
(nHashType & 0x1f) != SIGHASH_SINGLE and \
|
|
||||||
(nHashType & 0x1f) != SIGHASH_NONE
|
|
||||||
):
|
|
||||||
return getHashSequence(tx, b'ZTxIdSequencHash')
|
return getHashSequence(tx, b'ZTxIdSequencHash')
|
||||||
else:
|
else:
|
||||||
return blake2b(digest_size=32, person=b'ZTxIdSequencHash').digest()
|
return blake2b(digest_size=32, person=b'ZTxIdSequencHash').digest()
|
||||||
|
|
Loading…
Reference in New Issue