Dash Core  0.12.2.1
P2P Digital Currency
wallet.h File Reference
#include "amount.h"
#include "base58.h"
#include "streams.h"
#include "tinyformat.h"
#include "ui_interface.h"
#include "util.h"
#include "utilstrencodings.h"
#include "validationinterface.h"
#include "wallet/crypter.h"
#include "wallet/wallet_ismine.h"
#include "wallet/walletdb.h"
#include <algorithm>
#include <map>
#include <set>
#include <stdexcept>
#include <stdint.h>
#include <string>
#include <utility>
#include <vector>
#include <boost/shared_ptr.hpp>

Go to the source code of this file.

Classes

struct  CompactTallyItem
 
class  CKeyPool
 
class  CAddressBookData
 
struct  CRecipient
 
struct  COutputEntry
 
class  CMerkleTx
 
class  CWalletTx
 
class  COutput
 
class  CWalletKey
 
class  CAccountingEntry
 
class  CWallet
 
class  CReserveKey
 
class  CAccount
 

Typedefs

typedef std::map< std::string, std::string > mapValue_t
 

Enumerations

enum  WalletFeature {
  FEATURE_BASE = 10500, FEATURE_WALLETCRYPT = 40000, FEATURE_COMPRPUBKEY = 60000, FEATURE_HD = 120200,
  FEATURE_LATEST = 61000
}
 
enum  AvailableCoinsType {
  ALL_COINS = 1, ONLY_DENOMINATED = 2, ONLY_NOT1000IFMN = 3, ONLY_NONDENOMINATED_NOT1000IFMN = 4,
  ONLY_1000 = 5, ONLY_PRIVATESEND_COLLATERAL = 6
}
 

Functions

static void ReadOrderPos (int64_t &nOrderPos, mapValue_t &mapValue)
 
static void WriteOrderPos (const int64_t &nOrderPos, mapValue_t &mapValue)
 

Variables

CFeeRate payTxFee
 
CAmount maxTxFee
 
unsigned int nTxConfirmTarget
 
bool bSpendZeroConfChange
 
bool fSendFreeTransactions
 
bool fLargeWorkForkFound
 
bool fLargeWorkInvalidChainFound
 
static const unsigned int DEFAULT_KEYPOOL_SIZE = 1000
 
static const CAmount DEFAULT_TRANSACTION_FEE = 0
 -paytxfee default More...
 
static const CAmount nHighTransactionFeeWarning = 0.01 * COIN
 -paytxfee will warn if called with a higher fee than this amount (in satoshis) per KB More...
 
static const CAmount DEFAULT_LEGACY_FALLBACK_FEE = 20000
 -fallbackfee default More...
 
static const CAmount DEFAULT_DIP0001_FALLBACK_FEE = 1000
 
static const CAmount DEFAULT_LEGACY_TRANSACTION_MINFEE = 10000
 -mintxfee default More...
 
static const CAmount DEFAULT_DIP0001_TRANSACTION_MINFEE = 1000
 
static const CAmount DEFAULT_TRANSACTION_MAXFEE = 0.2 * COIN
 -maxtxfee default More...
 
static const CAmount MIN_CHANGE = CENT
 minimum change amount More...
 
static const bool DEFAULT_SPEND_ZEROCONF_CHANGE = true
 Default for -spendzeroconfchange. More...
 
static const bool DEFAULT_SEND_FREE_TRANSACTIONS = false
 Default for -sendfreetransactions. More...
 
static const unsigned int DEFAULT_TX_CONFIRM_TARGET = 2
 -txconfirmtarget default More...
 
static const CAmount nHighTransactionMaxFeeWarning = 100 * nHighTransactionFeeWarning
 -maxtxfee will warn if called with a higher fee than this amount (in satoshis) More...
 
static const unsigned int MAX_FREE_TRANSACTION_CREATE_SIZE = 1000
 Largest (in bytes) free transaction we're willing to create. More...
 
static const bool DEFAULT_WALLETBROADCAST = true
 
static const bool DEFAULT_USE_HD_WALLET = false
 if set, all keys will be derived by using BIP39/BIP44 More...
 

Typedef Documentation

◆ mapValue_t

typedef std::map<std::string, std::string> mapValue_t

Definition at line 180 of file wallet.h.

Enumeration Type Documentation

◆ AvailableCoinsType

Enumerator
ALL_COINS 
ONLY_DENOMINATED 
ONLY_NOT1000IFMN 
ONLY_NONDENOMINATED_NOT1000IFMN 
ONLY_1000 
ONLY_PRIVATESEND_COLLATERAL 

Definition at line 101 of file wallet.h.

◆ WalletFeature

(client) version numbers for particular wallet features

Enumerator
FEATURE_BASE 
FEATURE_WALLETCRYPT 
FEATURE_COMPRPUBKEY 
FEATURE_HD 
FEATURE_LATEST 

Definition at line 89 of file wallet.h.

Function Documentation

◆ ReadOrderPos()

static void ReadOrderPos ( int64_t &  nOrderPos,
mapValue_t mapValue 
)
static

Definition at line 183 of file wallet.h.

Referenced by CWalletTx::SerializationOp(), and CAccountingEntry::SerializationOp().

◆ WriteOrderPos()

static void WriteOrderPos ( const int64_t &  nOrderPos,
mapValue_t mapValue 
)
static

Definition at line 194 of file wallet.h.

Referenced by CWalletTx::SerializationOp(), and CAccountingEntry::SerializationOp().

Variable Documentation

◆ bSpendZeroConfChange

bool bSpendZeroConfChange

Definition at line 48 of file wallet.cpp.

Referenced by AppInit2(), CWalletTx::IsTrusted(), and CWallet::SelectCoins().

◆ DEFAULT_DIP0001_FALLBACK_FEE

const CAmount DEFAULT_DIP0001_FALLBACK_FEE = 1000
static

Definition at line 52 of file wallet.h.

Referenced by CDSNotificationInterface::UpdatedBlockTip().

◆ DEFAULT_DIP0001_TRANSACTION_MINFEE

const CAmount DEFAULT_DIP0001_TRANSACTION_MINFEE = 1000
static

Definition at line 60 of file wallet.h.

Referenced by CDSNotificationInterface::UpdatedBlockTip().

◆ DEFAULT_KEYPOOL_SIZE

const unsigned int DEFAULT_KEYPOOL_SIZE = 1000
static

Definition at line 45 of file wallet.h.

Referenced by HelpMessage(), keypoolrefill(), and CWallet::TopUpKeyPool().

◆ DEFAULT_LEGACY_FALLBACK_FEE

const CAmount DEFAULT_LEGACY_FALLBACK_FEE = 20000
static

-fallbackfee default

Definition at line 51 of file wallet.h.

Referenced by HelpMessage(), and CDSNotificationInterface::UpdatedBlockTip().

◆ DEFAULT_LEGACY_TRANSACTION_MINFEE

const CAmount DEFAULT_LEGACY_TRANSACTION_MINFEE = 10000
static

-mintxfee default

We are ~100 times smaller then bitcoin now (2016-03-01), set minTxFee 10 times higher so it's still 10 times lower comparing to bitcoin. 2017-07: we are 10x smaller now, let's lower defaults 10x via the same BIP9 bit as DIP0001

Definition at line 59 of file wallet.h.

Referenced by HelpMessage(), and CDSNotificationInterface::UpdatedBlockTip().

◆ DEFAULT_SEND_FREE_TRANSACTIONS

const bool DEFAULT_SEND_FREE_TRANSACTIONS = false
static

Default for -sendfreetransactions.

Definition at line 68 of file wallet.h.

Referenced by AppInit2(), and HelpMessage().

◆ DEFAULT_SPEND_ZEROCONF_CHANGE

const bool DEFAULT_SPEND_ZEROCONF_CHANGE = true
static

Default for -spendzeroconfchange.

Definition at line 66 of file wallet.h.

Referenced by AppInit2(), and HelpMessage().

◆ DEFAULT_TRANSACTION_FEE

const CAmount DEFAULT_TRANSACTION_FEE = 0
static

-paytxfee default

Definition at line 47 of file wallet.h.

Referenced by SendCoinsDialog::SendCoinsDialog().

◆ DEFAULT_TRANSACTION_MAXFEE

const CAmount DEFAULT_TRANSACTION_MAXFEE = 0.2 * COIN
static

-maxtxfee default

Definition at line 62 of file wallet.h.

Referenced by HelpMessage().

◆ DEFAULT_TX_CONFIRM_TARGET

const unsigned int DEFAULT_TX_CONFIRM_TARGET = 2
static

-txconfirmtarget default

Definition at line 70 of file wallet.h.

Referenced by AppInit2(), and HelpMessage().

◆ DEFAULT_USE_HD_WALLET

const bool DEFAULT_USE_HD_WALLET = false
static

if set, all keys will be derived by using BIP39/BIP44

Definition at line 78 of file wallet.h.

Referenced by AppInit2(), and HelpMessage().

◆ DEFAULT_WALLETBROADCAST

const bool DEFAULT_WALLETBROADCAST = true
static

Definition at line 75 of file wallet.h.

Referenced by AppInit2(), and HelpMessage().

◆ fLargeWorkForkFound

◆ fLargeWorkInvalidChainFound

◆ fSendFreeTransactions

bool fSendFreeTransactions

◆ MAX_FREE_TRANSACTION_CREATE_SIZE

const unsigned int MAX_FREE_TRANSACTION_CREATE_SIZE = 1000
static

Largest (in bytes) free transaction we're willing to create.

Definition at line 74 of file wallet.h.

Referenced by CWallet::CreateTransaction(), and CoinControlDialog::updateLabels().

◆ maxTxFee

◆ MIN_CHANGE

const CAmount MIN_CHANGE = CENT
static

minimum change amount

Definition at line 64 of file wallet.h.

Referenced by BOOST_AUTO_TEST_CASE(), CWallet::SelectCoinsMinConf(), and CoinControlDialog::updateLabels().

◆ nHighTransactionFeeWarning

const CAmount nHighTransactionFeeWarning = 0.01 * COIN
static

-paytxfee will warn if called with a higher fee than this amount (in satoshis) per KB

Definition at line 49 of file wallet.h.

Referenced by AppInit2().

◆ nHighTransactionMaxFeeWarning

const CAmount nHighTransactionMaxFeeWarning = 100 * nHighTransactionFeeWarning
static

-maxtxfee will warn if called with a higher fee than this amount (in satoshis)

Definition at line 72 of file wallet.h.

Referenced by AppInit2().

◆ nTxConfirmTarget

unsigned int nTxConfirmTarget

◆ payTxFee