From 9e314ba9d7db5aee1d2a97c2da8f2ae552e648e8 Mon Sep 17 00:00:00 2001 From: Daniel Gockel Date: Wed, 22 Sep 2021 13:50:38 +0200 Subject: [PATCH] Update rpc_transaction.py It only works with 'address'. Otherwise I get a "KeyError: 'addresses'" --- code/rpc_transaction.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/rpc_transaction.py b/code/rpc_transaction.py index f3686635..6330c174 100644 --- a/code/rpc_transaction.py +++ b/code/rpc_transaction.py @@ -13,4 +13,4 @@ decoded_tx = p.decoderawtransaction(raw_tx) # Retrieve each of the outputs from the transaction for output in decoded_tx['vout']: - print(output['scriptPubKey']['addresses'], output['value']) + print(output['scriptPubKey']['address'], output['value'])