mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
Merge #7688: List solvability in listunspent output and improve help
c3932b3 List solvability in listunspent output and improve help (Pieter Wuille)
This commit is contained in:
@@ -572,7 +572,7 @@ void WalletModel::getOutputs(const std::vector<COutPoint>& vOutpoints, std::vect
|
||||
if (!wallet->mapWallet.count(outpoint.hash)) continue;
|
||||
int nDepth = wallet->mapWallet[outpoint.hash].GetDepthInMainChain();
|
||||
if (nDepth < 0) continue;
|
||||
COutput out(&wallet->mapWallet[outpoint.hash], outpoint.n, nDepth, true);
|
||||
COutput out(&wallet->mapWallet[outpoint.hash], outpoint.n, nDepth, true, true);
|
||||
vOutputs.push_back(out);
|
||||
}
|
||||
}
|
||||
@@ -599,7 +599,7 @@ void WalletModel::listCoins(std::map<QString, std::vector<COutput> >& mapCoins)
|
||||
if (!wallet->mapWallet.count(outpoint.hash)) continue;
|
||||
int nDepth = wallet->mapWallet[outpoint.hash].GetDepthInMainChain();
|
||||
if (nDepth < 0) continue;
|
||||
COutput out(&wallet->mapWallet[outpoint.hash], outpoint.n, nDepth, true);
|
||||
COutput out(&wallet->mapWallet[outpoint.hash], outpoint.n, nDepth, true, true);
|
||||
if (outpoint.n < out.tx->vout.size() && wallet->IsMine(out.tx->vout[outpoint.n]) == ISMINE_SPENDABLE)
|
||||
vCoins.push_back(out);
|
||||
}
|
||||
@@ -611,7 +611,7 @@ void WalletModel::listCoins(std::map<QString, std::vector<COutput> >& mapCoins)
|
||||
while (wallet->IsChange(cout.tx->vout[cout.i]) && cout.tx->vin.size() > 0 && wallet->IsMine(cout.tx->vin[0]))
|
||||
{
|
||||
if (!wallet->mapWallet.count(cout.tx->vin[0].prevout.hash)) break;
|
||||
cout = COutput(&wallet->mapWallet[cout.tx->vin[0].prevout.hash], cout.tx->vin[0].prevout.n, 0, true);
|
||||
cout = COutput(&wallet->mapWallet[cout.tx->vin[0].prevout.hash], cout.tx->vin[0].prevout.n, 0, true, true);
|
||||
}
|
||||
|
||||
CTxDestination address;
|
||||
|
||||
Reference in New Issue
Block a user