Dump problem tx to temporary file when error happens. This allows developers to debug...
authorAmir Taaki <genjix@riseup.net>
Sun, 2 Sep 2012 17:11:21 +0000 (19:11 +0200)
committerAmir Taaki <genjix@riseup.net>
Sun, 2 Sep 2012 17:13:11 +0000 (19:13 +0200)
This would useful in the pro-mode GUI. There should be implemenation for the send method between both these GUIs rather than having their own copy-pasted version. Also the fee system needs fixing.

lib/gui_lite.py

index f63c181..dd71573 100644 (file)
@@ -659,6 +659,11 @@ class MiniActuator:
             
         status, message = self.wallet.sendtx(tx)
         if not status:
+            import tempfile
+            dumpf = tempfile.NamedTemporaryFile(delete=False)
+            dumpf.write(tx)
+            dumpf.close()
+            print "Dumped error tx to", dumpf.name
             QMessageBox.warning(parent_window, _('Error'), message, _('OK'))
             return False