mirror of
https://github.com/monero-project/monero.git
synced 2025-08-05 23:24:20 -04:00
add empty container sanity checks when using front() and back()
This commit is contained in:
parent
56fa6ce15f
commit
45a1c4c088
9 changed files with 32 additions and 6 deletions
|
@ -602,6 +602,13 @@ namespace tools
|
|||
uint64_t mixin = m_wallet->adjust_mixin(req.mixin);
|
||||
std::vector<wallet2::pending_tx> ptx_vector = m_wallet->create_transactions_2(dsts, mixin, req.unlock_time, req.priority, extra, req.account_index, req.subaddr_indices, m_trusted_daemon);
|
||||
|
||||
if (ptx_vector.empty())
|
||||
{
|
||||
er.code = WALLET_RPC_ERROR_CODE_TX_NOT_POSSIBLE;
|
||||
er.message = "No transaction created";
|
||||
return false;
|
||||
}
|
||||
|
||||
// reject proposed transactions if there are more than one. see on_transfer_split below.
|
||||
if (ptx_vector.size() != 1)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue