mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
Merge pull request #3904
4f3a4fb
blockchain: return error when requesting non existent output (moneromooo-monero)
This commit is contained in:
commit
5a221c0e48
1 changed files with 13 additions and 6 deletions
|
@ -1960,6 +1960,8 @@ bool Blockchain::get_outs(const COMMAND_RPC_GET_OUTPUTS_BIN::request& req, COMMA
|
|||
|
||||
res.outs.clear();
|
||||
res.outs.reserve(req.outputs.size());
|
||||
try
|
||||
{
|
||||
for (const auto &i: req.outputs)
|
||||
{
|
||||
// get tx_hash, tx_out_index from DB
|
||||
|
@ -1969,6 +1971,11 @@ bool Blockchain::get_outs(const COMMAND_RPC_GET_OUTPUTS_BIN::request& req, COMMA
|
|||
|
||||
res.outs.push_back({od.pubkey, od.commitment, unlocked, od.height, toi.first});
|
||||
}
|
||||
}
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
//------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in a new issue