Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.cpp
Show All 37 Lines | |||||
#include <cassert> | #include <cassert> | ||||
std::vector<CWalletRef> vpwallets; | std::vector<CWalletRef> vpwallets; | ||||
/** Transaction fee set by the user */ | /** Transaction fee set by the user */ | ||||
CFeeRate payTxFee(DEFAULT_TRANSACTION_FEE); | CFeeRate payTxFee(DEFAULT_TRANSACTION_FEE); | ||||
unsigned int nTxConfirmTarget = DEFAULT_TX_CONFIRM_TARGET; | unsigned int nTxConfirmTarget = DEFAULT_TX_CONFIRM_TARGET; | ||||
bool bSpendZeroConfChange = DEFAULT_SPEND_ZEROCONF_CHANGE; | bool bSpendZeroConfChange = DEFAULT_SPEND_ZEROCONF_CHANGE; | ||||
bool fSendFreeTransactions = DEFAULT_SEND_FREE_TRANSACTIONS; | |||||
const char *DEFAULT_WALLET_DAT = "wallet.dat"; | const char *DEFAULT_WALLET_DAT = "wallet.dat"; | ||||
const uint32_t BIP32_HARDENED_KEY_LIMIT = 0x80000000; | const uint32_t BIP32_HARDENED_KEY_LIMIT = 0x80000000; | ||||
/** | /** | ||||
* Fees smaller than this (in satoshi) are considered zero fee (for transaction | * Fees smaller than this (in satoshi) are considered zero fee (for transaction | ||||
* creation) | * creation) | ||||
* Override with -mintxfee | * Override with -mintxfee | ||||
▲ Show 20 Lines • Show All 3,969 Lines • ▼ Show 20 Lines | strUsage += HelpMessageOpt( | ||||
_("Fee (in %s/kB) to add to transactions you send (default: %s)"), | _("Fee (in %s/kB) to add to transactions you send (default: %s)"), | ||||
CURRENCY_UNIT, FormatMoney(payTxFee.GetFeePerK()))); | CURRENCY_UNIT, FormatMoney(payTxFee.GetFeePerK()))); | ||||
strUsage += HelpMessageOpt( | strUsage += HelpMessageOpt( | ||||
"-rescan", | "-rescan", | ||||
_("Rescan the block chain for missing wallet transactions on startup")); | _("Rescan the block chain for missing wallet transactions on startup")); | ||||
strUsage += HelpMessageOpt( | strUsage += HelpMessageOpt( | ||||
"-salvagewallet", | "-salvagewallet", | ||||
_("Attempt to recover private keys from a corrupt wallet on startup")); | _("Attempt to recover private keys from a corrupt wallet on startup")); | ||||
if (showDebug) { | |||||
strUsage += HelpMessageOpt( | |||||
"-sendfreetransactions", | |||||
strprintf(_("Send transactions as zero-fee transactions if " | |||||
"possible (default: %d)"), | |||||
DEFAULT_SEND_FREE_TRANSACTIONS)); | |||||
} | |||||
strUsage += | strUsage += | ||||
HelpMessageOpt("-spendzeroconfchange", | HelpMessageOpt("-spendzeroconfchange", | ||||
strprintf(_("Spend unconfirmed change when sending " | strprintf(_("Spend unconfirmed change when sending " | ||||
"transactions (default: %d)"), | "transactions (default: %d)"), | ||||
DEFAULT_SPEND_ZEROCONF_CHANGE)); | DEFAULT_SPEND_ZEROCONF_CHANGE)); | ||||
strUsage += | strUsage += | ||||
HelpMessageOpt("-txconfirmtarget=<n>", | HelpMessageOpt("-txconfirmtarget=<n>", | ||||
▲ Show 20 Lines • Show All 441 Lines • ▼ Show 20 Lines | if (gArgs.IsArgSet("-maxtxfee")) { | ||||
gArgs.GetArg("-maxtxfee", ""), ::minRelayTxFee.ToString())); | gArgs.GetArg("-maxtxfee", ""), ::minRelayTxFee.ToString())); | ||||
} | } | ||||
} | } | ||||
nTxConfirmTarget = | nTxConfirmTarget = | ||||
gArgs.GetArg("-txconfirmtarget", DEFAULT_TX_CONFIRM_TARGET); | gArgs.GetArg("-txconfirmtarget", DEFAULT_TX_CONFIRM_TARGET); | ||||
bSpendZeroConfChange = | bSpendZeroConfChange = | ||||
gArgs.GetBoolArg("-spendzeroconfchange", DEFAULT_SPEND_ZEROCONF_CHANGE); | gArgs.GetBoolArg("-spendzeroconfchange", DEFAULT_SPEND_ZEROCONF_CHANGE); | ||||
fSendFreeTransactions = gArgs.GetBoolArg("-sendfreetransactions", | |||||
DEFAULT_SEND_FREE_TRANSACTIONS); | |||||
if (fSendFreeTransactions && | |||||
gArgs.GetArg("-limitfreerelay", DEFAULT_LIMITFREERELAY) <= 0) { | |||||
return InitError("Creation of free transactions with their relay " | |||||
"disabled is not supported."); | |||||
} | |||||
return true; | return true; | ||||
} | } | ||||
bool CWallet::BackupWallet(const std::string &strDest) { | bool CWallet::BackupWallet(const std::string &strDest) { | ||||
return dbw->Backup(strDest); | return dbw->Backup(strDest); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 60 Lines • Show Last 20 Lines |