aboutsummaryrefslogtreecommitdiff
path: root/test/functional/test_framework
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/test_framework
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/test_framework')
-rw-r--r--test/functional/test_framework/script.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/functional/test_framework/script.py b/test/functional/test_framework/script.py
index 384062b808..51aa9057f7 100644
--- a/test/functional/test_framework/script.py
+++ b/test/functional/test_framework/script.py
@@ -2,7 +2,7 @@
# Copyright (c) 2015-2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-"""Functionality to build scripts, as well as SignatureHash().
+"""Functionality to build scripts, as well as signature hash functions.
This file is modified from python-bitcoinlib.
"""
@@ -608,7 +608,7 @@ def FindAndDelete(script, sig):
return CScript(r)
-def SignatureHash(script, txTo, inIdx, hashtype):
+def LegacySignatureHash(script, txTo, inIdx, hashtype):
"""Consensus-correct SignatureHash
Returns (hash, err) to precisely match the consensus-critical behavior of
@@ -662,7 +662,7 @@ def SignatureHash(script, txTo, inIdx, hashtype):
# Performance optimization probably not necessary for python tests, however.
# Note that this corresponds to sigversion == 1 in EvalScript, which is used
# for version 0 witnesses.
-def SegwitVersion1SignatureHash(script, txTo, inIdx, hashtype, amount):
+def SegwitV0SignatureHash(script, txTo, inIdx, hashtype, amount):
hashPrevouts = 0
hashSequence = 0