fix typo in lib/transaction.py

This commit is contained in:
zebra-lucky 2018-06-28 18:21:46 +03:00
parent ef7f6a28e8
commit 073adbed62
1 changed files with 1 additions and 1 deletions

View File

@ -851,7 +851,7 @@ class Transaction:
private_key = bitcoin.MySigningKey.from_secret_exponent(secexp, curve = SECP256k1) private_key = bitcoin.MySigningKey.from_secret_exponent(secexp, curve = SECP256k1)
public_key = private_key.get_verifying_key() public_key = private_key.get_verifying_key()
sig = private_key.sign_digest_deterministic(pre_hash, hashfunc=hashlib.sha256, sigencode = ecdsa.util.sigencode_der_canonize) sig = private_key.sign_digest_deterministic(pre_hash, hashfunc=hashlib.sha256, sigencode = ecdsa.util.sigencode_der_canonize)
if not public_key.verify_digest(sig, pre_hash, sigdecode = ecdsa.util.sigdecode_der_canonize): if not public_key.verify_digest(sig, pre_hash, sigdecode = ecdsa.util.sigdecode_der):
raise Exception('Sanity check verifying our own signature failed.') raise Exception('Sanity check verifying our own signature failed.')
txin['signatures'][j] = bh2u(sig) + '01' txin['signatures'][j] = bh2u(sig) + '01'
#txin['x_pubkeys'][j] = pubkey #txin['x_pubkeys'][j] = pubkey