Merge pull request #5850

c4da1a2 wallet2: fix unset_ring tx retrieval checks (moneromooo-monero)
This commit is contained in:
luigi1111 2019-09-08 20:00:55 -05:00
commit 19ef2e99ad
No known key found for this signature in database
GPG key ID: F4ACA0183641E010

View file

@ -7258,9 +7258,7 @@ bool wallet2::unset_ring(const crypto::hash &txid)
bool ok = invoke_http_json("/gettransactions", req, res, rpc_timeout); bool ok = invoke_http_json("/gettransactions", req, res, rpc_timeout);
m_daemon_rpc_mutex.unlock(); m_daemon_rpc_mutex.unlock();
THROW_WALLET_EXCEPTION_IF(!ok, error::wallet_internal_error, "Failed to get transaction from daemon"); THROW_WALLET_EXCEPTION_IF(!ok, error::wallet_internal_error, "Failed to get transaction from daemon");
if (res.txs.empty()) THROW_WALLET_EXCEPTION_IF(res.txs.size() != 1, error::wallet_internal_error, "Failed to get transaction from daemon");
return false;
THROW_WALLET_EXCEPTION_IF(res.txs.size(), error::wallet_internal_error, "Failed to get transaction from daemon");
cryptonote::transaction tx; cryptonote::transaction tx;
crypto::hash tx_hash; crypto::hash tx_hash;