1
0
mirror of https://github.com/bitcoinbook/bitcoinbook synced 2024-11-25 01:18:18 +00:00

Update rpc_transaction.py

It only works with 'address'. Otherwise I get a "KeyError: 'addresses'"
This commit is contained in:
Daniel Gockel 2021-09-22 13:50:38 +02:00 committed by GitHub
parent a144e84c2d
commit 9e314ba9d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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'])