mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
scripted-diff: wallet: rename AvailableCoinsParams members to snake_case
-BEGIN VERIFY SCRIPT- sed -i 's/nMinimumAmount/min_amount/g' $(git grep -l nMinimumAmount) sed -i 's/nMaximumAmount/max_amount/g' $(git grep -l nMaximumAmount) sed -i 's/nMinimumSumAmount/min_sum_amount/g' $(git grep -l nMinimumSumAmount) sed -i 's/nMaximumCount/max_count/g' $(git grep -l nMaximumCount) -END VERIFY SCRIPT-
This commit is contained in:
parent
61c2265629
commit
fa84df1f03
5 changed files with 15 additions and 15 deletions
|
|
@ -268,7 +268,7 @@ CoinsResult AvailableCoins(const CWallet& wallet,
|
|||
const CTxOut& output = wtx.tx->vout[i];
|
||||
const COutPoint outpoint(wtxid, i);
|
||||
|
||||
if (output.nValue < params.nMinimumAmount || output.nValue > params.nMaximumAmount)
|
||||
if (output.nValue < params.min_amount || output.nValue > params.max_amount)
|
||||
continue;
|
||||
|
||||
// Skip manually selected coins (the caller can fetch them directly)
|
||||
|
|
@ -324,14 +324,14 @@ CoinsResult AvailableCoins(const CWallet& wallet,
|
|||
// Cache total amount as we go
|
||||
result.total_amount += output.nValue;
|
||||
// Checks the sum amount of all UTXO's.
|
||||
if (params.nMinimumSumAmount != MAX_MONEY) {
|
||||
if (result.total_amount >= params.nMinimumSumAmount) {
|
||||
if (params.min_sum_amount != MAX_MONEY) {
|
||||
if (result.total_amount >= params.min_sum_amount) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
// Checks the maximum number of UTXO's.
|
||||
if (params.nMaximumCount > 0 && result.Size() >= params.nMaximumCount) {
|
||||
if (params.max_count > 0 && result.Size() >= params.max_count) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue