mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-08-04 05:54:48 +02:00
Wallet: Keep segwit_inputs_only in simple variable for duration of AvailableCoins
This commit is contained in:
parent
3186ca786b
commit
2dc8bd803d
@ -316,6 +316,7 @@ CoinsResult AvailableCoins(const CWallet& wallet,
|
|||||||
const int min_depth = {coinControl ? coinControl->m_min_depth : DEFAULT_MIN_DEPTH};
|
const int min_depth = {coinControl ? coinControl->m_min_depth : DEFAULT_MIN_DEPTH};
|
||||||
const int max_depth = {coinControl ? coinControl->m_max_depth : DEFAULT_MAX_DEPTH};
|
const int max_depth = {coinControl ? coinControl->m_max_depth : DEFAULT_MAX_DEPTH};
|
||||||
const bool only_safe = {coinControl ? !coinControl->m_include_unsafe_inputs : true};
|
const bool only_safe = {coinControl ? !coinControl->m_include_unsafe_inputs : true};
|
||||||
|
const bool segwit_inputs_only = {coinControl ? coinControl->m_segwit_inputs_only : false};
|
||||||
const bool can_grind_r = wallet.CanGrindR();
|
const bool can_grind_r = wallet.CanGrindR();
|
||||||
std::vector<COutPoint> outpoints;
|
std::vector<COutPoint> outpoints;
|
||||||
|
|
||||||
@ -409,7 +410,7 @@ CoinsResult AvailableCoins(const CWallet& wallet,
|
|||||||
|
|
||||||
std::unique_ptr<SigningProvider> provider = wallet.GetSolvingProvider(output.scriptPubKey);
|
std::unique_ptr<SigningProvider> provider = wallet.GetSolvingProvider(output.scriptPubKey);
|
||||||
|
|
||||||
if (coinControl && coinControl->m_segwit_inputs_only && !IsSegWitOutput(*provider, wtx.tx->vout[i].scriptPubKey)) {
|
if (segwit_inputs_only && !IsSegWitOutput(*provider, wtx.tx->vout[i].scriptPubKey)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user