Skip to content

Commit

Permalink
[Trivial] Fix typo utoxs --> utxos
Browse files Browse the repository at this point in the history
  • Loading branch information
random-zebra committed Apr 27, 2021
1 parent 1c929a5 commit b2bef3f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/test/evo_deterministicmns_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,25 +37,25 @@ static SimpleUTXOMap BuildSimpleUtxoMap(const std::vector<CTransaction>& txs)
return utxos;
}

static std::vector<COutPoint> SelectUTXOs(SimpleUTXOMap& utoxs, CAmount amount, CAmount& changeRet)
static std::vector<COutPoint> SelectUTXOs(SimpleUTXOMap& utxos, CAmount amount, CAmount& changeRet)
{
changeRet = 0;
amount += fee;

std::vector<COutPoint> selectedUtxos;
CAmount selectedAmount = 0;
int chainHeight = chainActive.Height();
while (!utoxs.empty()) {
while (!utxos.empty()) {
bool found = false;
for (auto it = utoxs.begin(); it != utoxs.end(); ++it) {
for (auto it = utxos.begin(); it != utxos.end(); ++it) {
if (chainHeight - it->second.first < 100) {
continue;
}

found = true;
selectedAmount += it->second.second;
selectedUtxos.emplace_back(it->first);
utoxs.erase(it);
utxos.erase(it);
break;
}
BOOST_ASSERT(found);
Expand All @@ -68,10 +68,10 @@ static std::vector<COutPoint> SelectUTXOs(SimpleUTXOMap& utoxs, CAmount amount,
return selectedUtxos;
}

static void FundTransaction(CMutableTransaction& tx, SimpleUTXOMap& utoxs, const CScript& scriptPayout, const CScript& scriptChange, CAmount amount)
static void FundTransaction(CMutableTransaction& tx, SimpleUTXOMap& utxos, const CScript& scriptPayout, const CScript& scriptChange, CAmount amount)
{
CAmount change;
auto inputs = SelectUTXOs(utoxs, amount, change);
auto inputs = SelectUTXOs(utxos, amount, change);
for (size_t i = 0; i < inputs.size(); i++) {
tx.vin.emplace_back(inputs[i]);
}
Expand Down

0 comments on commit b2bef3f

Please sign in to comment.