Dump problem tx to temporary file when error happens. This allows developers to debug failed transactions from users by having access to the raw tx dump to see what is wrong.

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.
This commit is contained in:
Amir Taaki 2012-09-02 19:11:21 +02:00
parent 9c122c23ea
commit 89a4045e3a
1 changed files with 5 additions and 0 deletions

View File

@ -659,6 +659,11 @@ class MiniActuator:
status, message = self.wallet.sendtx(tx) status, message = self.wallet.sendtx(tx)
if not status: 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')) QMessageBox.warning(parent_window, _('Error'), message, _('OK'))
return False return False