From 9b48f1136334808aaef2cc46e836f02b0a8d4009 Mon Sep 17 00:00:00 2001 From: Larry Salibra Date: Thu, 26 Nov 2015 13:20:55 +0800 Subject: [PATCH] Dump raw transaction on error --- pybitcoin/services/blockcypher.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pybitcoin/services/blockcypher.py b/pybitcoin/services/blockcypher.py index 7d486d7..09f0cc3 100644 --- a/pybitcoin/services/blockcypher.py +++ b/pybitcoin/services/blockcypher.py @@ -87,5 +87,6 @@ def broadcast_transaction(hex_tx, blockchain_client): reply['success'] = True return reply else: - err_str = 'Tx hash missing from blockcypher response: ' + str(data) + err_str = 'Tx hash missing from blockcypher response: ' + str(data) + "\n\n" + err_str = err_str + 'Raw transaction hex: ' + str(hex_tx) raise Exception(err_str)