Skip to content

Commit

Permalink
[Bug] rawtx none: rpc exception is already catched in load_utxos_thread
Browse files Browse the repository at this point in the history
  • Loading branch information
random-zebra committed Dec 4, 2019
1 parent d8c8cef commit bb105c6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
10 changes: 4 additions & 6 deletions src/tabRewards.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,9 @@ def load_utxos_thread(self, ctrl):
# double check that the rpc connection is still active, else reconnect
if self.caller.rpcClient is None:
self.caller.updateRPCstatus(None)
try:
rawtx = self.caller.rpcClient.getRawTransaction(u['txid'])
except Exception as e:
printError(getCallerName(), getFunctionName(),
"Unable to get raw TX with hash=%s from RPC server: %s" % (
u['txid'], str(e)))
rawtx = self.caller.rpcClient.getRawTransaction(u['txid'])
if rawtx is None:
printDbg("Unable to get raw TX with hash=%s from RPC server." % u['txid'])
# Don't save UTXO if raw TX is unavailable
continue
else:
Expand Down Expand Up @@ -402,6 +399,7 @@ def FinishSend(self, serialized_tx, amount_to_send):
txid = self.caller.rpcClient.sendRawTransaction(tx_hex, self.useSwiftX())
if txid is None:
raise Exception("Unable to send TX - connection to RPC server lost.")
printDbg("Transaction sent. ID: %s" % txid)
mess2_text = "<p>Transaction successfully sent.</p>"
mess2 = QMessageBox(QMessageBox.Information, 'transaction Sent', mess2_text)
mess2.setDetailedText(txid)
Expand Down
4 changes: 2 additions & 2 deletions src/version.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"number": "0.1.0",
"tag": "a",
"comments": ["SPMT backport"]
"tag": "b",
"comments": ["bug rawtx none in send"]
}

0 comments on commit bb105c6

Please sign in to comment.