aboutsummaryrefslogtreecommitdiff
path: root/src/wallet.cpp
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2012-05-31 16:01:16 -0400
committerGavin Andresen <gavinandresen@gmail.com>2012-07-05 12:50:09 -0400
commita2709fad7f57b000333371954016045e12fc4bed (patch)
tree378022e0c8b67dbd02a138b792bdb7be777e5822 /src/wallet.cpp
parent899d373b3ccb3003f8f6e518ba4cf7ba4028e58b (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.cpp7
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)