From 9622dcff06edadb76f743d76c1c48a61c776213f Mon Sep 17 00:00:00 2001 From: ltg001 <1071629548@qq.com> Date: Fri, 25 May 2018 20:12:09 +0800 Subject: [PATCH] Update miner.py --- simpleCoin/miner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simpleCoin/miner.py b/simpleCoin/miner.py index 2e5b964..4b357d3 100644 --- a/simpleCoin/miner.py +++ b/simpleCoin/miner.py @@ -109,7 +109,7 @@ def mine(a, blockchain, node_pending_transactions): # ...we reward the miner by adding a transaction # First we load all pending transactions sent to the node server NODE_PENDING_TRANSACTIONS = requests.get(MINER_NODE_URL + "/txion?update=" + MINER_ADDRESS).content - NODE_PENDING_TRANSACTIONS = json.loads(NODE_PENDING_TRANSACTIONS) + NODE_PENDING_TRANSACTIONS = json.loads(NODE_PENDING_TRANSACTIONS.decode('utf-8')) # Then we add the mining reward NODE_PENDING_TRANSACTIONS.append({ "from": "network",