Skip to content

Commit

Permalink
fixed Python 3 error in bci_pushtx
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan K Loesch committed Jul 27, 2017
1 parent 9417cae commit 87806f3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion bitcoin/bci.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
import json, re
import random
import sys

from bitcoin.main import from_string_to_bytes


try:
from urllib.request import build_opener
except:
Expand Down Expand Up @@ -256,7 +260,10 @@ def history(*args):
def bci_pushtx(tx):
if not re.match('^[0-9a-fA-F]*$', tx):
tx = tx.encode('hex')
return make_request('https://blockchain.info/pushtx', 'tx='+tx)
return make_request(
'https://blockchain.info/pushtx',
from_string_to_bytes('tx='+tx)
)


def eligius_pushtx(tx):
Expand Down

0 comments on commit 87806f3

Please sign in to comment.