Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.h
Show All 35 Lines | |||||
/** | /** | ||||
* Settings | * Settings | ||||
*/ | */ | ||||
extern CFeeRate payTxFee; | extern CFeeRate payTxFee; | ||||
extern unsigned int nTxConfirmTarget; | extern unsigned int nTxConfirmTarget; | ||||
extern bool bSpendZeroConfChange; | extern bool bSpendZeroConfChange; | ||||
extern bool fSendFreeTransactions; | extern bool fSendFreeTransactions; | ||||
static const unsigned int DEFAULT_KEYPOOL_SIZE = 100; | static const unsigned int DEFAULT_KEYPOOL_SIZE = 1000; | ||||
//! -paytxfee default | //! -paytxfee default | ||||
static const Amount DEFAULT_TRANSACTION_FEE(0); | static const Amount DEFAULT_TRANSACTION_FEE(0); | ||||
//! -fallbackfee default | //! -fallbackfee default | ||||
static const Amount DEFAULT_FALLBACK_FEE(20000); | static const Amount DEFAULT_FALLBACK_FEE(20000); | ||||
//! -mintxfee default | //! -mintxfee default | ||||
static const Amount DEFAULT_TRANSACTION_MINFEE(1000); | static const Amount DEFAULT_TRANSACTION_MINFEE(1000); | ||||
//! minimum recommended increment for BIP 125 replacement txs | //! minimum recommended increment for BIP 125 replacement txs | ||||
static const Amount WALLET_INCREMENTAL_RELAY_FEE(5000); | static const Amount WALLET_INCREMENTAL_RELAY_FEE(5000); | ||||
▲ Show 20 Lines • Show All 577 Lines • ▼ Show 20 Lines | private: | ||||
void SyncTransaction(const CTransactionRef &tx, | void SyncTransaction(const CTransactionRef &tx, | ||||
const CBlockIndex *pindexBlockConnected, | const CBlockIndex *pindexBlockConnected, | ||||
int posInBlock); | int posInBlock); | ||||
/* the HD chain data model (external chain counters) */ | /* the HD chain data model (external chain counters) */ | ||||
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(CKeyMetadata &metadata, CKey &secret, | void DeriveNewChildKey(CWalletDB &walletdb, CKeyMetadata &metadata, | ||||
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 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, | ||||
▲ Show 20 Lines • Show All 138 Lines • ▼ Show 20 Lines | public: | ||||
void UnlockCoin(const COutPoint &output); | void UnlockCoin(const COutPoint &output); | ||||
void UnlockAllCoins(); | void UnlockAllCoins(); | ||||
void ListLockedCoins(std::vector<COutPoint> &vOutpts); | void ListLockedCoins(std::vector<COutPoint> &vOutpts); | ||||
/** | /** | ||||
* keystore implementation | * keystore implementation | ||||
* Generate a new key | * Generate a new key | ||||
*/ | */ | ||||
CPubKey GenerateNewKey(bool internal = false); | CPubKey GenerateNewKey(CWalletDB &walletdb, bool internal = false); | ||||
//! Adds a key to the store, and saves it to disk. | //! Adds a key to the store, and saves it to disk. | ||||
bool AddKeyPubKey(const CKey &key, const CPubKey &pubkey) override; | bool AddKeyPubKey(const CKey &key, const CPubKey &pubkey) override; | ||||
bool AddKeyPubKeyWithDB(CWalletDB &walletdb, const CKey &key, | |||||
const CPubKey &pubkey); | |||||
//! Adds a key to the store, without saving it to disk (used by LoadWallet) | //! Adds a key to the store, without saving it to disk (used by LoadWallet) | ||||
bool LoadKey(const CKey &key, const CPubKey &pubkey) { | bool LoadKey(const CKey &key, const CPubKey &pubkey) { | ||||
return CCryptoKeyStore::AddKeyPubKey(key, pubkey); | return CCryptoKeyStore::AddKeyPubKey(key, pubkey); | ||||
} | } | ||||
//! Load metadata (used by LoadWallet) | //! Load metadata (used by LoadWallet) | ||||
bool LoadKeyMetadata(const CTxDestination &pubKey, | bool LoadKeyMetadata(const CTxDestination &pubKey, | ||||
const CKeyMetadata &metadata); | const CKeyMetadata &metadata); | ||||
▲ Show 20 Lines • Show All 403 Lines • Show Last 20 Lines |