1
0
Fork 0
forked from lthn/blockchain

coretests: fixed a bug with ZC outs handling in fill_tx_sources()

This commit is contained in:
sowle 2023-08-02 22:56:57 +02:00
parent d1e066c609
commit b0bbca04d6
No known key found for this signature in database
GPG key ID: C07A24B2D89D49FC

View file

@ -1351,7 +1351,7 @@ bool fill_tx_sources(std::vector<currency::tx_source_entry>& sources, const std:
if (sout.type().hash_code() == typeid(uint64_t).hash_code()) // output by global index
{
uint64_t gindex = boost::get<uint64_t>(sout);
auto& outs_by_amount = outs[s.amount];
auto& outs_by_amount = outs[s.amount_for_global_output_index()];
if (gindex >= outs_by_amount.size())
return false;
outs_by_amount[gindex].spent = true;