Depracate "label" API, replacing with account

New RPC methods: move, sendfrom
Change to getbalance (now takes optional [account] argument)
Renamed methods with "label" in their names.
sendtoaddress returns hexadecimal transaction ID instead of "sent".



git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@188 1a98c847-1fd6-4fd8-948a-caf3550aa51b
This commit is contained in:
gavinandresen
2010-11-22 15:53:20 +00:00
parent 298a771494
commit e4ff4e6898
5 changed files with 515 additions and 91 deletions

11
db.h
View File

@@ -11,6 +11,8 @@ class CUser;
class CReview;
class CAddress;
class CWalletTx;
class CAccount;
class CAccountingEntry;
extern map<string, string> mapAddressBook;
extern CCriticalSection cs_mapAddressBook;
@@ -341,7 +343,9 @@ public:
class CWalletDB : public CDB
{
public:
CWalletDB(const char* pszMode="r+") : CDB("wallet.dat", pszMode) { }
CWalletDB(const char* pszMode="r+") : CDB("wallet.dat", pszMode)
{
}
private:
CWalletDB(const CWalletDB&);
void operator=(const CWalletDB&);
@@ -425,6 +429,11 @@ public:
return Write(make_pair(string("setting"), strKey), value);
}
bool ReadAccount(const string& strAccount, CAccount& account);
bool WriteAccount(const string& strAccount, const CAccount& account);
bool WriteAccountingEntry(const string& strAccount, const CAccountingEntry& acentry);
int64 GetAccountCreditDebit(const string& strAccount);
bool LoadWallet();
protected:
void ReserveKeyFromKeyPool(int64& nIndex, CKeyPool& keypool);