diff options
author | Gavin Andresen <gavinandresen@gmail.com> | 2012-05-31 16:01:16 -0400 |
---|---|---|
committer | Gavin Andresen <gavinandresen@gmail.com> | 2012-07-05 12:50:09 -0400 |
commit | a2709fad7f57b000333371954016045e12fc4bed (patch) | |
tree | 378022e0c8b67dbd02a138b792bdb7be777e5822 /src/wallet.cpp | |
parent | 899d373b3ccb3003f8f6e518ba4cf7ba4028e58b (diff) |
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 127d580803..4d99ce6560 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) |