aboutsummaryrefslogtreecommitdiff
path: root/test/functional/feature_block.py
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2019-10-14 17:04:34 -0400
committerJohn Newbery <john@johnnewbery.com>2019-10-14 17:13:05 -0400
commiteebcdfa86a3dad4969fa9994614bcb446849ed2b (patch)
tree8908e1db3b4a1ea49d30da00b7f67f8384accf17 /test/functional/feature_block.py
parentb33c03b0cb82e57eb862542c9d331b7ceb8f3a62 (diff)
[test] rename SegwitVersion1SignatureHash()
The function implementing segwit v0 signature hash was originally named SegwitVersion1SignatureHash() (presumably before segwit v0 was named segwit v0). Rename it to SegwitV0SignatureHash(). Also rename SignatureHash() to LegacySignatureHash() for disambiguation.
Diffstat (limited to 'test/functional/feature_block.py')
-rwxr-xr-xtest/functional/feature_block.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/functional/feature_block.py b/test/functional/feature_block.py
index c74270febc..c7e98bd4db 100755
--- a/test/functional/feature_block.py
+++ b/test/functional/feature_block.py
@@ -46,7 +46,7 @@ from test_framework.script import (
OP_RETURN,
OP_TRUE,
SIGHASH_ALL,
- SignatureHash,
+ LegacySignatureHash,
hash160,
)
from test_framework.test_framework import BitcoinTestFramework
@@ -532,7 +532,7 @@ class FullBlockTest(BitcoinTestFramework):
# second input is corresponding P2SH output from b39
tx.vin.append(CTxIn(COutPoint(b39.vtx[i].sha256, 0), b''))
# Note: must pass the redeem_script (not p2sh_script) to the signature hash function
- (sighash, err) = SignatureHash(redeem_script, tx, 1, SIGHASH_ALL)
+ (sighash, err) = LegacySignatureHash(redeem_script, tx, 1, SIGHASH_ALL)
sig = self.coinbase_key.sign_ecdsa(sighash) + bytes(bytearray([SIGHASH_ALL]))
scriptSig = CScript([sig, redeem_script])
@@ -1312,7 +1312,7 @@ class FullBlockTest(BitcoinTestFramework):
if (scriptPubKey[0] == OP_TRUE): # an anyone-can-spend
tx.vin[0].scriptSig = CScript()
return
- (sighash, err) = SignatureHash(spend_tx.vout[0].scriptPubKey, tx, 0, SIGHASH_ALL)
+ (sighash, err) = LegacySignatureHash(spend_tx.vout[0].scriptPubKey, tx, 0, SIGHASH_ALL)
tx.vin[0].scriptSig = CScript([self.coinbase_key.sign_ecdsa(sighash) + bytes(bytearray([SIGHASH_ALL]))])
def create_and_sign_transaction(self, spend_tx, value, script=CScript([OP_TRUE])):