diff options
| author | Gavin Andresen <[email protected]> | 2012-05-31 16:01:16 -0400 |
|---|---|---|
| committer | Gavin Andresen <[email protected]> | 2012-07-05 12:50:09 -0400 |
| commit | a2709fad7f57b000333371954016045e12fc4bed (patch) | |
| tree | 378022e0c8b67dbd02a138b792bdb7be777e5822 /src/wallet.cpp | |
| parent | RPCTypeCheck method to make type-checking JSON Arrays easier. (diff) | |
| download | discoin-a2709fad7f57b000333371954016045e12fc4bed.tar.xz discoin-a2709fad7f57b000333371954016045e12fc4bed.zip | |
Implement raw transaction RPC calls
Implement listunspent / getrawtransaction / createrawtransaction /
signrawtransaction, to support creation and
signing-on-multiple-device multisignature transactions.
Diffstat (limited to 'src/wallet.cpp')
| -rw-r--r-- | src/wallet.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/wallet.cpp b/src/wallet.cpp index 127d58080..4d99ce656 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -899,7 +899,7 @@ int64 CWallet::GetImmatureBalance() const } // populate vCoins with vector of spendable COutputs -void CWallet::AvailableCoins(vector<COutput>& vCoins) const +void CWallet::AvailableCoins(vector<COutput>& vCoins, bool fOnlyConfirmed) const { vCoins.clear(); @@ -909,7 +909,10 @@ void CWallet::AvailableCoins(vector<COutput>& vCoins) const { const CWalletTx* pcoin = &(*it).second; - if (!pcoin->IsFinal() || !pcoin->IsConfirmed()) + if (!pcoin->IsFinal()) + continue; + + if (fOnlyConfirmed && !pcoin->IsConfirmed()) continue; if (pcoin->IsCoinBase() && pcoin->GetBlocksToMaturity() > 0) |