mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 07:09:15 +01: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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user