return false;
}
+bool CWallet::AddCScript(const uint160 &hash, const std::vector<unsigned char>& data)
+{
+ if (!CCryptoKeyStore::AddCScript(hash, data))
+ return false;
+ if (!fFileBacked)
+ return true;
+ return CWalletDB(strWalletFile).WriteCScript(hash, data);
+}
+
bool CWallet::Unlock(const SecureString& strWalletPassphrase)
{
if (!IsLocked())
return 0;
}
+bool CWallet::IsChange(const CTxOut& txout) const
+{
+ CBitcoinAddress address;
+ if (ExtractAddress(txout.scriptPubKey, this, address) && !address.IsScript())
+ CRITICAL_BLOCK(cs_wallet)
+ if (!mapAddressBook.count(address))
+ return true;
+ return false;
+}
+
int64 CWalletTx::GetTxTime() const
{
return nTimeReceived;
nFee = nDebit - nValueOut;
}
- // Sent/received. Standard client will never generate a send-to-multiple-recipients,
- // but non-standard clients might (so return a list of address/amount pairs)
+ // Sent/received.
BOOST_FOREACH(const CTxOut& txout, vout)
{
CBitcoinAddress address;