Skip to content

Commit

Permalink
fixed signing on python2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
rubensayshi committed Feb 24, 2015
1 parent 425a82b commit cd59424
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion blocktrail/wallet.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import struct
import random
from pycoin.key.BIP32Node import BIP32Node
from bitcoin.core import x, b2x, lx, COutPoint, CMutableTxOut, CMutableTxIn, CMutableTransaction
Expand Down Expand Up @@ -116,7 +117,7 @@ def pay(self, pay, change_address=None, allow_zero_conf=False, randomize_change_

ckey = CBitcoinSecret(key.wif())

sig = ckey.sign(sighash) + bytes([SIGHASH_ALL])
sig = ckey.sign(sighash) + struct.pack("B", SIGHASH_ALL)

txins[idx].scriptSig = CScript([OP_0, sig, redeemScript])

Expand Down

0 comments on commit cd59424

Please sign in to comment.