Merge 029c65e04c into merged_master (Bitcoin PR #17141)

This commit is contained in:
Andrew Poelstra 2020-11-09 21:20:39 +00:00
commit 2f310a3a3e
3 changed files with 12 additions and 12 deletions

View file

@ -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
@ -670,7 +670,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