Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.h
Show First 20 Lines • Show All 634 Lines • ▼ Show 20 Lines | private: | ||||
CHDChain hdChain; | CHDChain hdChain; | ||||
/* HD derive new child key (on internal or external chain) */ | /* HD derive new child key (on internal or external chain) */ | ||||
void DeriveNewChildKey(CWalletDB &walletdb, CKeyMetadata &metadata, | void DeriveNewChildKey(CWalletDB &walletdb, CKeyMetadata &metadata, | ||||
CKey &secret, bool internal = false); | CKey &secret, bool internal = false); | ||||
std::set<int64_t> setInternalKeyPool; | std::set<int64_t> setInternalKeyPool; | ||||
std::set<int64_t> setExternalKeyPool; | std::set<int64_t> setExternalKeyPool; | ||||
int64_t m_max_keypool_index; | |||||
int64_t nTimeFirstKey; | int64_t nTimeFirstKey; | ||||
/** | /** | ||||
* Private version of AddWatchOnly method which does not accept a timestamp, | * Private version of AddWatchOnly method which does not accept a timestamp, | ||||
* and which will reset the wallet's nTimeFirstKey value to 1 if the watch | * and which will reset the wallet's nTimeFirstKey value to 1 if the watch | ||||
* key did not previously have a timestamp associated with it. Because this | * key did not previously have a timestamp associated with it. Because this | ||||
* is an inherited virtual method, it is accessible despite being marked | * is an inherited virtual method, it is accessible despite being marked | ||||
Show All 28 Lines | public: | ||||
std::string GetName() const { | std::string GetName() const { | ||||
if (dbw) { | if (dbw) { | ||||
return dbw->GetName(); | return dbw->GetName(); | ||||
} else { | } else { | ||||
return "dummy"; | return "dummy"; | ||||
} | } | ||||
} | } | ||||
void LoadKeyPool(int nIndex, const CKeyPool &keypool) { | void LoadKeyPool(int64_t nIndex, const CKeyPool &keypool) { | ||||
if (keypool.fInternal) { | if (keypool.fInternal) { | ||||
setInternalKeyPool.insert(nIndex); | setInternalKeyPool.insert(nIndex); | ||||
} else { | } else { | ||||
setExternalKeyPool.insert(nIndex); | setExternalKeyPool.insert(nIndex); | ||||
} | } | ||||
m_max_keypool_index = std::max(m_max_keypool_index, nIndex); | |||||
// If no metadata exists yet, create a default with the pool key's | // If no metadata exists yet, create a default with the pool key's | ||||
// creation time. Note that this may be overwritten by actually stored | // creation time. Note that this may be overwritten by actually stored | ||||
// metadata for that key later, which is fine. | // metadata for that key later, which is fine. | ||||
CKeyID keyid = keypool.vchPubKey.GetID(); | CKeyID keyid = keypool.vchPubKey.GetID(); | ||||
if (mapKeyMetadata.count(keyid) == 0) | if (mapKeyMetadata.count(keyid) == 0) | ||||
mapKeyMetadata[keyid] = CKeyMetadata(keypool.nTime); | mapKeyMetadata[keyid] = CKeyMetadata(keypool.nTime); | ||||
} | } | ||||
Show All 23 Lines | void SetNull() { | ||||
nWalletVersion = FEATURE_BASE; | nWalletVersion = FEATURE_BASE; | ||||
nWalletMaxVersion = FEATURE_BASE; | nWalletMaxVersion = FEATURE_BASE; | ||||
nMasterKeyMaxID = 0; | nMasterKeyMaxID = 0; | ||||
pwalletdbEncryption = nullptr; | pwalletdbEncryption = nullptr; | ||||
nOrderPosNext = 0; | nOrderPosNext = 0; | ||||
nAccountingEntryNumber = 0; | nAccountingEntryNumber = 0; | ||||
nNextResend = 0; | nNextResend = 0; | ||||
nLastResend = 0; | nLastResend = 0; | ||||
m_max_keypool_index = 0; | |||||
nTimeFirstKey = 0; | nTimeFirstKey = 0; | ||||
fBroadcastTransactions = false; | fBroadcastTransactions = false; | ||||
} | } | ||||
std::map<uint256, CWalletTx> mapWallet; | std::map<uint256, CWalletTx> mapWallet; | ||||
std::list<CAccountingEntry> laccentries; | std::list<CAccountingEntry> laccentries; | ||||
typedef std::pair<CWalletTx *, CAccountingEntry *> TxPair; | typedef std::pair<CWalletTx *, CAccountingEntry *> TxPair; | ||||
▲ Show 20 Lines • Show All 470 Lines • Show Last 20 Lines |