mirror of
https://github.com/monero-project/monero.git
synced 2025-08-23 13:25:04 -04:00
Convey tx verification failure reasons to the RPC client
This allows appropriate action to be taken, like displaying the reason to the user. Do just that in simplewallet, which should help a lot in determining why users fail to send. Also make it so a tx which is accepted but not relayed is seen as a success rather than a failure.
This commit is contained in:
parent
1559c71ef2
commit
24b3e9007a
10 changed files with 98 additions and 23 deletions
|
@ -1958,7 +1958,7 @@ void wallet2::commit_tx(pending_tx& ptx)
|
|||
m_daemon_rpc_mutex.unlock();
|
||||
THROW_WALLET_EXCEPTION_IF(!r, error::no_connection_to_daemon, "sendrawtransaction");
|
||||
THROW_WALLET_EXCEPTION_IF(daemon_send_resp.status == CORE_RPC_STATUS_BUSY, error::daemon_busy, "sendrawtransaction");
|
||||
THROW_WALLET_EXCEPTION_IF(daemon_send_resp.status != CORE_RPC_STATUS_OK, error::tx_rejected, ptx.tx, daemon_send_resp.status);
|
||||
THROW_WALLET_EXCEPTION_IF(daemon_send_resp.status != CORE_RPC_STATUS_OK, error::tx_rejected, ptx.tx, daemon_send_resp.status, daemon_send_resp.reason);
|
||||
|
||||
txid = get_transaction_hash(ptx.tx);
|
||||
crypto::hash payment_id = cryptonote::null_hash;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue