Update qa from Bitcoin Core 0.13.2

This commit is contained in:
lateminer
2018-11-10 18:07:40 +03:00
parent cceb5fb27a
commit 34b50d3645
72 changed files with 2925 additions and 1039 deletions

View File

@@ -15,8 +15,9 @@ Functionality to build scripts, as well as SignatureHash().
"""
from .mininode import CTransaction, CTxOut, hash256
from .mininode import CTransaction, CTxOut, sha256, hash256, uint256_from_str, ser_uint256, ser_string
from binascii import hexlify
import hashlib
import sys
bchr = chr
@@ -36,6 +37,10 @@ MAX_SCRIPT_OPCODES = 201
OPCODE_NAMES = {}
def hash160(s):
return hashlib.new('ripemd160', sha256(s)).digest()
_opcode_instances = []
class CScriptOp(int):
"""A single script opcode"""
@@ -877,7 +882,7 @@ def SignatureHash(script, txTo, inIdx, hashtype):
tmp = txtmp.vout[outIdx]
txtmp.vout = []
for i in range(outIdx):
txtmp.vout.append(CTxOut())
txtmp.vout.append(CTxOut(-1))
txtmp.vout.append(tmp)
for i in range(len(txtmp.vin)):