do not raise an error, send it in the result instead
[electrum-server.git] / backends / bitcoind / blockchain_processor.py
index ef41793..83c79ac 100644 (file)
@@ -460,7 +460,7 @@ class BlockchainProcessor(Processor):
 
                     # re-add them to the history
                     self.add_to_history( prevout_addr, x.get('prevout_hash'), x.get('prevout_n'), prevout_height)
-                    print_log( "new hist for", hash_160_to_bc_address(prevout_addr), self.deserialize(self.batch_list[prevout_addr]) )
+                    # print_log( "new hist for", hash_160_to_bc_address(prevout_addr), self.deserialize(self.batch_list[prevout_addr]) )
 
         # write
         max_len = 0
@@ -591,9 +591,13 @@ class BlockchainProcessor(Processor):
                     print_log( "error:", error)
 
         elif method == 'blockchain.transaction.broadcast':
-            txo = self.bitcoind('sendrawtransaction', params)
-            print_log( "sent tx:", txo )
-            result = txo 
+            try:
+                txo = self.bitcoind('sendrawtransaction', params)
+                print_log( "sent tx:", txo )
+                result = txo 
+            except BaseException, e:
+                result = str(e) # do not send an error
+                print_log( "error:", str(e), params )
 
         elif method == 'blockchain.transaction.get_merkle':
             if cache_only: