From 19ec56b92310103ebe0e1f72e5e63913bdfb139b Mon Sep 17 00:00:00 2001 From: ThomasV Date: Sun, 18 Oct 2015 12:23:21 +0200 Subject: [PATCH] fix: sign tx inputs with the new low s class --- lib/transaction.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/transaction.py b/lib/transaction.py index 42b51f2f0..fa4636f84 100644 --- a/lib/transaction.py +++ b/lib/transaction.py @@ -745,7 +745,7 @@ class Transaction: for_sig = Hash(self.tx_for_sig(i).decode('hex')) pkey = regenerate_key(sec) secexp = pkey.secret - private_key = ecdsa.SigningKey.from_secret_exponent( secexp, curve = SECP256k1 ) + private_key = bitcoin.MySigningKey.from_secret_exponent( secexp, curve = SECP256k1 ) public_key = private_key.get_verifying_key() sig = private_key.sign_digest_deterministic( for_sig, hashfunc=hashlib.sha256, sigencode = ecdsa.util.sigencode_der ) assert public_key.verify_digest( sig, for_sig, sigdecode = ecdsa.util.sigdecode_der)