 |
PRCYCoin
2.0.0.7rc1
P2P Digital Currency
|
Go to the documentation of this file.
8 #ifndef BITCOIN_WALLETDB_H
9 #define BITCOIN_WALLETDB_H
64 template <
typename Stream,
typename Operation>
87 bool WriteName(
const std::string& strAddress,
const std::string& strName);
88 bool EraseName(
const std::string& strAddress);
90 bool WritePurpose(
const std::string& strAddress,
const std::string& purpose);
142 bool WriteMultiSend(std::vector<std::pair<std::string, int> > vMultiSend);
143 bool EraseMultiSend(std::vector<std::pair<std::string, int> > vMultiSend);
144 bool WriteMSettings(
bool fMultiSendStake,
bool fMultiSendMasternode,
int nLastMultiSendHeight);
171 bool WriteDestData(
const std::string& address,
const std::string&
key,
const std::string& value);
187 static bool Recover(
CDBEnv& dbenv, std::string filename,
bool fOnlyKeys);
203 bool BackupWallet(
const CWallet& wallet,
const fs::path& strDest,
bool fEnableCustom =
true);
207 #endif // BITCOIN_WALLETDB_H
bool WriteBestBlock(const CBlockLocator &locator)
bool ReadReserveAmount(double &amount)
void ListAccountCreditDebit(const std::string &strAccount, std::list< CAccountingEntry > &acentries)
bool EraseMultiSig(const CScript &script)
bool WriteOrderPosNext(int64_t nOrderPosNext)
bool WriteKeyImage(const std::string &outpointKey, const CKeyImage &k)
void NotifyBacked(const CWallet &wallet, bool fSuccess, std::string strMessage)
void ThreadFlushWalletDB(const std::string &strFile)
DBErrors FindWalletTx(CWallet *pwallet, std::vector< uint256 > &vTxHash, std::vector< CWalletTx > &vWtx)
bool WriteAutoConsolidateSettingTime(uint32_t settingTime)
bool Write2FAPeriod(int period)
bool WriteCryptedHDChain(const CHDChain &chain)
bool WritePurpose(const std::string &strAddress, const std::string &purpose)
DBErrors ZapWalletTx(CWallet *pwallet, std::vector< CWalletTx > &vWtx)
bool ErasePurpose(const std::string &strAddress)
void operator=(const CWalletDB &)
bool WriteAccountingEntry_Backend(const CAccountingEntry &acentry)
This writes directly to the database, and will not update the CWallet's cached accounting entries!...
bool EraseTx(uint256 hash)
bool WriteMSDisabledAddresses(std::vector< std::string > vDisabledAddresses)
bool ReadAccount(const std::string &strAccount, CAccount &account)
bool WriteMultiSig(const CScript &script)
std::vector< unsigned char, secure_allocator< unsigned char > > CPrivKey
secp256k1: const unsigned int PRIVATE_KEY_SIZE = 279; const unsigned int PUBLIC_KEY_SIZE = 65; const ...
std::string Read2FASecret()
bool WriteCScript(const uint160 &hash, const CScript &redeemScript)
CWalletDB(const std::string &strFilename, const char *pszMode="r+", bool fFlushOnClose=true)
bool Write2FALastTime(uint64_t lastTime)
bool EraseMultiSend(std::vector< std::pair< std::string, int > > vMultiSend)
Private key encryption is done based on a CMasterKey, which holds a salt and random encryption key.
bool ReadScannedBlockHeight(int &height)
bool WriteCryptedKey(const CPubKey &vchPubKey, const std::vector< unsigned char > &vchCryptedSecret, const CKeyMetadata &keyMeta)
bool ReadKeyImage(const std::string &outpointKey, CKeyImage &k)
uint32_t ReadAutoConsolidateSettingTime()
bool EraseWatchOnly(const CScript &script)
RAII class that provides access to a Berkeley database.
bool WritePool(int64_t nPool, const CKeyPool &keypool)
bool WriteAccountingEntry(const uint64_t nAccEntryNum, const CAccountingEntry &acentry)
DBErrors LoadWallet(CWallet *pwallet)
bool Write2FA(bool status)
bool WriteMasterKey(unsigned int nID, const CMasterKey &kMasterKey)
Access to the wallet database (wallet.dat)
uint64_t Read2FALastTime()
int64_t CAmount
Amount in PRCY (Can be negative)
bool ReadPool(int64_t nPool, CKeyPool &keypool)
bool WriteAutoCombineSettings(bool fEnable, CAmount nCombineThreshold)
bool ErasePool(int64_t nPool)
256-bit unsigned big integer.
static void IncrementUpdateCounter()
bool WriteKey(const CPubKey &vchPubKey, const CPrivKey &vchPrivKey, const CKeyMetadata &keyMeta)
bool WriteWatchOnly(const CScript &script)
Serialized script, used inside transaction inputs and outputs.
bool WriteDefaultKey(const CPubKey &vchPubKey)
bool ReadBestBlock(CBlockLocator &locator)
CAmount GetAccountCreditDebit(const std::string &strAccount)
bool AttemptBackupWallet(const CWallet &wallet, const fs::path &pathSrc, const fs::path &pathDest)
bool WriteAccount(const std::string &strAccount, const CAccount &account)
DBErrors
Error statuses for the wallet database.
160-bit unsigned big integer.
An encapsulated public key.
DBErrors ReorderTransactions(CWallet *pwallet)
bool WriteMSettings(bool fMultiSendStake, bool fMultiSendMasternode, int nLastMultiSendHeight)
bool WriteTx(uint256 hash, const CWalletTx &wtx)
A CWallet is an extension of a keystore, which also maintains a set of transactions and balances,...
A transaction with a bunch of additional info that only the owner cares about.
bool Write2FASecret(std::string secret)
static bool Compact(CDBEnv &dbenv, const std::string &strFile)
bool WriteDestData(const std::string &address, const std::string &key, const std::string &value)
Write destination data key,value tuple to database.
bool WriteStakeSplitThreshold(uint64_t nStakeSplitThreshold)
bool ReadTxPrivateKey(const std::string &outpointKey, std::string &k)
static bool Recover(CDBEnv &dbenv, std::string filename, bool fOnlyKeys)
bool EraseMSDisabledAddresses(std::vector< std::string > vDisabledAddresses)
static unsigned int GetUpdateCounter()
bool EraseDestData(const std::string &address, const std::string &key)
Erase destination data tuple from wallet database.
bool WriteReserveAmount(const double &amount)
Describes a place in the block chain to another node such that if the other node doesn't have the sam...
bool WriteHDPubKey(const CHDPubKey &hdPubKey, const CKeyMetadata &keyMeta)
bool ReadStealthAccount(const std::string &strAccount, CStealthAccount &account)
bool WriteStealthAccount(const std::string &strAccount, const CStealthAccount &account)
bool ReadStealthAccountList(std::string &accountList)
bool WriteScannedBlockHeight(int height)
bool AppendStealthAccountList(const std::string &accountName)
bool WriteStakingStatus(bool status)
bool WriteMinVersion(int nVersion)
bool WriteTxPrivateKey(const std::string &outpointKey, const std::string &k)
bool WriteName(const std::string &strAddress, const std::string &strName)
bool WriteMultiSend(std::vector< std::pair< std::string, int > > vMultiSend)
bool BackupWallet(const CWallet &wallet, const fs::path &strDest, bool fEnableCustom=true)
bool WriteHDChain(const CHDChain &chain)
bool EraseName(const std::string &strAddress)