Raven Core
3.0.0
P2P Digital Currency
|
Functions | |
CAmount | CWallet::GetBalance () const |
CAmount | CWallet::GetUnconfirmedBalance () const |
CAmount | CWallet::GetImmatureBalance () const |
CAmount | CWallet::GetWatchOnlyBalance () const |
CAmount | CWallet::GetUnconfirmedWatchOnlyBalance () const |
CAmount | CWallet::GetImmatureWatchOnlyBalance () const |
CAmount | CWallet::GetLegacyBalance (const isminefilter &filter, int minDepth, const std::string *account) const |
CAmount | CWallet::GetAvailableBalance (const CCoinControl *coinControl=nullptr) const |
void | CWallet::AvailableCoins (std::vector< COutput > &vCoins, bool fOnlySafe=true, const CCoinControl *coinControl=nullptr, const CAmount &nMinimumAmount=1, const CAmount &nMaximumAmount=MAX_MONEY, const CAmount &nMinimumSumAmount=MAX_MONEY, const uint64_t &nMaximumCount=0, const int &nMinDepth=0, const int &nMaxDepth=9999999) const |
populate vCoins with vector of available COutputs. More... | |
void | CWallet::AvailableAssets (std::map< std::string, std::vector< COutput > > &mapAssetCoins, bool fOnlySafe=true, const CCoinControl *coinControl=nullptr, const CAmount &nMinimumAmount=1, const CAmount &nMaximumAmount=MAX_MONEY, const CAmount &nMinimumSumAmount=MAX_MONEY, const uint64_t &nMaximumCount=0, const int &nMinDepth=0, const int &nMaxDepth=9999999) const |
Helper function that calls AvailableCoinsAll, used for transfering assets. More... | |
void | CWallet::AvailableCoinsWithAssets (std::vector< COutput > &vCoins, std::map< std::string, std::vector< COutput > > &mapAssetCoins, bool fOnlySafe=true, const CCoinControl *coinControl=nullptr, const CAmount &nMinimumAmount=1, const CAmount &nMaximumAmount=MAX_MONEY, const CAmount &nMinimumSumAmount=MAX_MONEY, const uint64_t &nMaximumCount=0, const int &nMinDepth=0, const int &nMaxDepth=9999999) const |
Helper function that calls AvailableCoinsAll, used to receive all coins, Assets and RVN. More... | |
void | CWallet::AvailableCoinsAll (std::vector< COutput > &vCoins, std::map< std::string, std::vector< COutput > > &mapAssetCoins, bool fGetRVN=true, bool fOnlyAssets=false, bool fOnlySafe=true, const CCoinControl *coinControl=nullptr, const CAmount &nMinimumAmount=1, const CAmount &nMaximumAmount=MAX_MONEY, const CAmount &nMinimumSumAmount=MAX_MONEY, const uint64_t &nMaximumCount=0, const int &nMinDepth=0, const int &nMaxDepth=9999999) const |
populate vCoins with vector of available COutputs, and populates vAssetCoins in fWithAssets is set to true. More... | |
std::map< CTxDestination, std::vector< COutput > > | CWallet::ListAssets () const |
Return list of available assets and locked assets grouped by non-change output address. More... | |
std::map< CTxDestination, std::vector< COutput > > | CWallet::ListCoins () const |
Return list of available coins and locked coins grouped by non-change output address. More... | |
const CTxOut & | CWallet::FindNonChangeParentOutput (const CTransaction &tx, int output) const |
Find non-change parent output. More... | |
bool | CWallet::SelectCoinsMinConf (const CAmount &nTargetValue, int nConfMine, int nConfTheirs, uint64_t nMaxAncestors, std::vector< COutput > vCoins, std::set< CInputCoin > &setCoinsRet, CAmount &nValueRet) const |
Shuffle and select coins until nTargetValue is reached while avoiding small change; This method is stochastic for some inputs and upon completion the coin set and corresponding actual target value is assembled. More... | |
bool | CWallet::SelectCoins (const std::vector< COutput > &vAvailableCoins, const CAmount &nTargetValue, std::set< CInputCoin > &setCoinsRet, CAmount &nValueRet, const CCoinControl *coinControl=nullptr) const |
Select a set of coins such that nValueRet >= nTargetValue and at least all coins from coinControl are selected; Never select unconfirmed coins if they are not ours. More... | |
bool | CWallet::CreateNewChangeAddress (CReserveKey &reservekey, CKeyID &keyID, std::string &strFailReason) |
RVN START. More... | |
bool | CWallet::SelectAssetsMinConf (const CAmount &nTargetValue, const int nConfMine, const int nConfTheirs, const uint64_t nMaxAncestors, const std::string &strAssetName, std::vector< COutput > vCoins, std::set< CInputCoin > &setCoinsRet, CAmount &nValueRet) const |
bool | CWallet::SelectAssets (const std::map< std::string, std::vector< COutput > > &mapAvailableAssets, const std::map< std::string, CAmount > &mapAssetTargetValue, std::set< CInputCoin > &setCoinsRet, std::map< std::string, CAmount > &nValueRet) const |
bool | CWallet::SignTransaction (CMutableTransaction &tx) |
RVN END. More... | |
bool | CWallet::FundTransaction (CMutableTransaction &tx, CAmount &nFeeRet, int &nChangePosInOut, std::string &strFailReason, bool lockUnspents, const std::set< int > &setSubtractFeeFromOutputs, CCoinControl) |
Insert additional inputs into the transaction by calling CreateTransaction();. More... | |
bool | CWallet::CreateTransactionWithAssets (const std::vector< CRecipient > &vecSend, CWalletTx &wtxNew, CReserveKey &reservekey, CAmount &nFeeRet, int &nChangePosInOut, std::string &strFailReason, const CCoinControl &coin_control, const std::vector< CNewAsset > assets, const CTxDestination destination, const AssetType &assetType, bool sign=true) |
RVN START. More... | |
bool | CWallet::CreateTransactionWithTransferAsset (const std::vector< CRecipient > &vecSend, CWalletTx &wtxNew, CReserveKey &reservekey, CAmount &nFeeRet, int &nChangePosInOut, std::string &strFailReason, const CCoinControl &coin_control, bool sign=true) |
bool | CWallet::CreateTransactionWithReissueAsset (const std::vector< CRecipient > &vecSend, CWalletTx &wtxNew, CReserveKey &reservekey, CAmount &nFeeRet, int &nChangePosInOut, std::string &strFailReason, const CCoinControl &coin_control, const CReissueAsset &reissueAsset, const CTxDestination destination, bool sign=true) |
bool | CWallet::CreateTransaction (const std::vector< CRecipient > &vecSend, CWalletTx &wtxNew, CReserveKey &reservekey, CAmount &nFeeRet, int &nChangePosInOut, std::string &strFailReason, const CCoinControl &coin_control, bool sign=true) |
bool | CWallet::CreateTransactionAll (const std::vector< CRecipient > &vecSend, CWalletTx &wtxNew, CReserveKey &reservekey, CAmount &nFeeRet, int &nChangePosInOut, std::string &strFailReason, const CCoinControl &coin_control, bool fNewAsset, const CNewAsset &asset, const CTxDestination dest, bool fTransferAsset, bool fReissueAsset, const CReissueAsset &reissueAsset, const AssetType &assetType, bool sign=true) |
Create a new transaction paying the recipients with a set of coins selected by SelectCoins(); Also create the change output, when needed. More... | |
bool | CWallet::CreateTransactionAll (const std::vector< CRecipient > &vecSend, CWalletTx &wtxNew, CReserveKey &reservekey, CAmount &nFeeRet, int &nChangePosInOut, std::string &strFailReason, const CCoinControl &coin_control, bool fNewAsset, const std::vector< CNewAsset > assets, const CTxDestination destination, bool fTransferAsset, bool fReissueAsset, const CReissueAsset &reissueAsset, const AssetType &assetType, bool sign) |
bool | CWallet::CommitTransaction (CWalletTx &wtxNew, CReserveKey &reservekey, CConnman *connman, CValidationState &state) |
RVN END. More... | |
void | CWallet::ListAccountCreditDebit (const std::string &strAccount, std::list< CAccountingEntry > &entries) |
bool | CWallet::AddAccountingEntry (const CAccountingEntry &) |
bool | CWallet::AddAccountingEntry (const CAccountingEntry &, CWalletDB *pwalletdb) |
DBErrors | CWallet::LoadWallet (bool &fFirstRunRet) |
DBErrors | CWallet::ZapSelectTx (std::vector< uint256 > &vHashIn, std::vector< uint256 > &vHashOut) |
DBErrors | CWallet::ZapWalletTx (std::vector< CWalletTx > &vWtx) |
bool | CWallet::SetAddressBook (const CTxDestination &address, const std::string &strName, const std::string &purpose) |
bool | CWallet::DelAddressBook (const CTxDestination &address) |
const std::string & | CWallet::GetAccountName (const CScript &scriptPubKey) const |
bool | CWallet::NewKeyPool () |
Mark old keypool keys as used, and generate all new keys. More... | |
size_t | CWallet::KeypoolCountExternalKeys () |
void | CWallet::LoadKeyPool (int64_t nIndex, const CKeyPool &keypool) |
bool | CWallet::TopUpKeyPool (unsigned int kpSize=0) |
void | CWallet::ReserveKeyFromKeyPool (int64_t &nIndex, CKeyPool &keypool, bool fRequestedInternal) |
void | CWallet::KeepKey (int64_t nIndex) |
void | CWallet::ReturnKey (int64_t nIndex, bool fInternal, const CPubKey &pubkey) |
bool | CWallet::GetKeyFromPool (CPubKey &key, bool internal=false) |
int64_t | CWallet::GetOldestKeyPoolTime () |
std::map< CTxDestination, CAmount > | CWallet::GetAddressBalances () |
std::set< std::set< CTxDestination > > | CWallet::GetAddressGroupings () |
std::set< CTxDestination > | CWallet::GetAccountAddresses (const std::string &strAccount) const |
bool | CReserveKey::GetReservedKey (CPubKey &pubkey, bool internal=false) |
void | CReserveKey::KeepKey () |
void | CReserveKey::ReturnKey () |
void | CWallet::MarkReserveKeysAsUsed (int64_t keypool_id) |
Marks all keys in the keypool up to and including reserve_key as used. More... | |
void | CWallet::GetScriptForMining (std::shared_ptr< CReserveScript > &script) |
void | CWallet::LockCoin (const COutPoint &output) |
void | CWallet::UnlockCoin (const COutPoint &output) |
void | CWallet::UnlockAllCoins () |
bool | CWallet::IsLockedCoin (uint256 hash, unsigned int n) const |
void | CWallet::ListLockedCoins (std::vector< COutPoint > &vOutpts) const |
bool CWallet::AddAccountingEntry | ( | const CAccountingEntry & | acentry | ) |
bool CWallet::AddAccountingEntry | ( | const CAccountingEntry & | acentry, |
CWalletDB * | pwalletdb | ||
) |
void CWallet::AvailableAssets | ( | std::map< std::string, std::vector< COutput > > & | mapAssetCoins, |
bool | fOnlySafe = true , |
||
const CCoinControl * | coinControl = nullptr , |
||
const CAmount & | nMinimumAmount = 1 , |
||
const CAmount & | nMaximumAmount = MAX_MONEY , |
||
const CAmount & | nMinimumSumAmount = MAX_MONEY , |
||
const uint64_t & | nMaximumCount = 0 , |
||
const int & | nMinDepth = 0 , |
||
const int & | nMaxDepth = 9999999 |
||
) | const |
Helper function that calls AvailableCoinsAll, used for transfering assets.
Definition at line 2165 of file wallet.cpp.
void CWallet::AvailableCoins | ( | std::vector< COutput > & | vCoins, |
bool | fOnlySafe = true , |
||
const CCoinControl * | coinControl = nullptr , |
||
const CAmount & | nMinimumAmount = 1 , |
||
const CAmount & | nMaximumAmount = MAX_MONEY , |
||
const CAmount & | nMinimumSumAmount = MAX_MONEY , |
||
const uint64_t & | nMaximumCount = 0 , |
||
const int & | nMinDepth = 0 , |
||
const int & | nMaxDepth = 9999999 |
||
) | const |
populate vCoins with vector of available COutputs.
Definition at line 2159 of file wallet.cpp.
void CWallet::AvailableCoinsAll | ( | std::vector< COutput > & | vCoins, |
std::map< std::string, std::vector< COutput > > & | mapAssetCoins, | ||
bool | fGetRVN = true , |
||
bool | fOnlyAssets = false , |
||
bool | fOnlySafe = true , |
||
const CCoinControl * | coinControl = nullptr , |
||
const CAmount & | nMinimumAmount = 1 , |
||
const CAmount & | nMaximumAmount = MAX_MONEY , |
||
const CAmount & | nMinimumSumAmount = MAX_MONEY , |
||
const uint64_t & | nMaximumCount = 0 , |
||
const int & | nMinDepth = 0 , |
||
const int & | nMaxDepth = 9999999 |
||
) | const |
populate vCoins with vector of available COutputs, and populates vAssetCoins in fWithAssets is set to true.
RVN START
RVN END
Definition at line 2186 of file wallet.cpp.
void CWallet::AvailableCoinsWithAssets | ( | std::vector< COutput > & | vCoins, |
std::map< std::string, std::vector< COutput > > & | mapAssetCoins, | ||
bool | fOnlySafe = true , |
||
const CCoinControl * | coinControl = nullptr , |
||
const CAmount & | nMinimumAmount = 1 , |
||
const CAmount & | nMaximumAmount = MAX_MONEY , |
||
const CAmount & | nMinimumSumAmount = MAX_MONEY , |
||
const uint64_t & | nMaximumCount = 0 , |
||
const int & | nMinDepth = 0 , |
||
const int & | nMaxDepth = 9999999 |
||
) | const |
Helper function that calls AvailableCoinsAll, used to receive all coins, Assets and RVN.
Definition at line 2178 of file wallet.cpp.
bool CWallet::CommitTransaction | ( | CWalletTx & | wtxNew, |
CReserveKey & | reservekey, | ||
CConnman * | connman, | ||
CValidationState & | state | ||
) |
RVN END.
Call after CreateTransaction unless you want to abort.
Definition at line 3683 of file wallet.cpp.
bool CWallet::CreateNewChangeAddress | ( | CReserveKey & | reservekey, |
CKeyID & | keyID, | ||
std::string & | strFailReason | ||
) |
RVN START.
Definition at line 2756 of file wallet.cpp.
bool CWallet::CreateTransaction | ( | const std::vector< CRecipient > & | vecSend, |
CWalletTx & | wtxNew, | ||
CReserveKey & | reservekey, | ||
CAmount & | nFeeRet, | ||
int & | nChangePosInOut, | ||
std::string & | strFailReason, | ||
const CCoinControl & | coin_control, | ||
bool | sign = true |
||
) |
bool CWallet::CreateTransactionAll | ( | const std::vector< CRecipient > & | vecSend, |
CWalletTx & | wtxNew, | ||
CReserveKey & | reservekey, | ||
CAmount & | nFeeRet, | ||
int & | nChangePosInOut, | ||
std::string & | strFailReason, | ||
const CCoinControl & | coin_control, | ||
bool | fNewAsset, | ||
const CNewAsset & | asset, | ||
const CTxDestination | dest, | ||
bool | fTransferAsset, | ||
bool | fReissueAsset, | ||
const CReissueAsset & | reissueAsset, | ||
const AssetType & | assetType, | ||
bool | sign = true |
||
) |
Create a new transaction paying the recipients with a set of coins selected by SelectCoins(); Also create the change output, when needed.
Definition at line 3100 of file wallet.cpp.
bool CWallet::CreateTransactionAll | ( | const std::vector< CRecipient > & | vecSend, |
CWalletTx & | wtxNew, | ||
CReserveKey & | reservekey, | ||
CAmount & | nFeeRet, | ||
int & | nChangePosInOut, | ||
std::string & | strFailReason, | ||
const CCoinControl & | coin_control, | ||
bool | fNewAsset, | ||
const std::vector< CNewAsset > | assets, | ||
const CTxDestination | destination, | ||
bool | fTransferAsset, | ||
bool | fReissueAsset, | ||
const CReissueAsset & | reissueAsset, | ||
const AssetType & | assetType, | ||
bool | sign | ||
) |
RVN START
RVN END
RVN START
RVN END
RVN START
RVN END
RVN START
RVN END
RVN START
RVN END
RVN START
RVN END
RVN START
RVN END
RVN START
RVN END
RVN START
RVN END
RVN START
RVN END
Definition at line 3113 of file wallet.cpp.
bool CWallet::CreateTransactionWithAssets | ( | const std::vector< CRecipient > & | vecSend, |
CWalletTx & | wtxNew, | ||
CReserveKey & | reservekey, | ||
CAmount & | nFeeRet, | ||
int & | nChangePosInOut, | ||
std::string & | strFailReason, | ||
const CCoinControl & | coin_control, | ||
const std::vector< CNewAsset > | assets, | ||
const CTxDestination | destination, | ||
const AssetType & | assetType, | ||
bool | sign = true |
||
) |
bool CWallet::CreateTransactionWithReissueAsset | ( | const std::vector< CRecipient > & | vecSend, |
CWalletTx & | wtxNew, | ||
CReserveKey & | reservekey, | ||
CAmount & | nFeeRet, | ||
int & | nChangePosInOut, | ||
std::string & | strFailReason, | ||
const CCoinControl & | coin_control, | ||
const CReissueAsset & | reissueAsset, | ||
const CTxDestination | destination, | ||
bool | sign = true |
||
) |
bool CWallet::CreateTransactionWithTransferAsset | ( | const std::vector< CRecipient > & | vecSend, |
CWalletTx & | wtxNew, | ||
CReserveKey & | reservekey, | ||
CAmount & | nFeeRet, | ||
int & | nChangePosInOut, | ||
std::string & | strFailReason, | ||
const CCoinControl & | coin_control, | ||
bool | sign = true |
||
) |
bool CWallet::DelAddressBook | ( | const CTxDestination & | address | ) |
Definition at line 3850 of file wallet.cpp.
const CTxOut & CWallet::FindNonChangeParentOutput | ( | const CTransaction & | tx, |
int | output | ||
) | const |
Find non-change parent output.
Definition at line 2471 of file wallet.cpp.
bool CWallet::FundTransaction | ( | CMutableTransaction & | tx, |
CAmount & | nFeeRet, | ||
int & | nChangePosInOut, | ||
std::string & | strFailReason, | ||
bool | lockUnspents, | ||
const std::set< int > & | setSubtractFeeFromOutputs, | ||
CCoinControl | coinControl | ||
) |
Insert additional inputs into the transaction by calling CreateTransaction();.
Definition at line 3011 of file wallet.cpp.
std::set< CTxDestination > CWallet::GetAccountAddresses | ( | const std::string & | strAccount | ) | const |
const std::string & CWallet::GetAccountName | ( | const CScript & | scriptPubKey | ) | const |
std::map< CTxDestination, CAmount > CWallet::GetAddressBalances | ( | ) |
Definition at line 4105 of file wallet.cpp.
std::set< std::set< CTxDestination > > CWallet::GetAddressGroupings | ( | ) |
Definition at line 4145 of file wallet.cpp.
CAmount CWallet::GetAvailableBalance | ( | const CCoinControl * | coinControl = nullptr | ) | const |
CAmount CWallet::GetBalance | ( | ) | const |
Definition at line 2010 of file wallet.cpp.
CAmount CWallet::GetImmatureBalance | ( | ) | const |
Definition at line 2041 of file wallet.cpp.
CAmount CWallet::GetImmatureWatchOnlyBalance | ( | ) | const |
Definition at line 2086 of file wallet.cpp.
bool CWallet::GetKeyFromPool | ( | CPubKey & | key, |
bool | internal = false |
||
) |
CAmount CWallet::GetLegacyBalance | ( | const isminefilter & | filter, |
int | minDepth, | ||
const std::string * | account | ||
) | const |
Definition at line 2106 of file wallet.cpp.
int64_t CWallet::GetOldestKeyPoolTime | ( | ) |
Definition at line 4090 of file wallet.cpp.
bool CReserveKey::GetReservedKey | ( | CPubKey & | pubkey, |
bool | internal = false |
||
) |
void CWallet::GetScriptForMining | ( | std::shared_ptr< CReserveScript > & | script | ) |
Definition at line 4310 of file wallet.cpp.
CAmount CWallet::GetUnconfirmedBalance | ( | ) | const |
Definition at line 2026 of file wallet.cpp.
CAmount CWallet::GetUnconfirmedWatchOnlyBalance | ( | ) | const |
Definition at line 2071 of file wallet.cpp.
CAmount CWallet::GetWatchOnlyBalance | ( | ) | const |
Definition at line 2055 of file wallet.cpp.
bool CWallet::IsLockedCoin | ( | uint256 | hash, |
unsigned int | n | ||
) | const |
void CWallet::KeepKey | ( | int64_t | nIndex | ) |
void CReserveKey::KeepKey | ( | ) |
size_t CWallet::KeypoolCountExternalKeys | ( | ) |
void CWallet::ListAccountCreditDebit | ( | const std::string & | strAccount, |
std::list< CAccountingEntry > & | entries | ||
) |
std::map< CTxDestination, std::vector< COutput > > CWallet::ListAssets | ( | ) | const |
Return list of available assets and locked assets grouped by non-change output address.
RVN START.
Definition at line 2373 of file wallet.cpp.
std::map< CTxDestination, std::vector< COutput > > CWallet::ListCoins | ( | ) | const |
Return list of available coins and locked coins grouped by non-change output address.
RVN END.
Definition at line 2425 of file wallet.cpp.
void CWallet::ListLockedCoins | ( | std::vector< COutPoint > & | vOutpts | ) | const |
void CWallet::LoadKeyPool | ( | int64_t | nIndex, |
const CKeyPool & | keypool | ||
) |
Definition at line 3921 of file wallet.cpp.
DBErrors CWallet::LoadWallet | ( | bool & | fFirstRunRet | ) |
Definition at line 3749 of file wallet.cpp.
void CWallet::LockCoin | ( | const COutPoint & | output | ) |
void CWallet::MarkReserveKeysAsUsed | ( | int64_t | keypool_id | ) |
Marks all keys in the keypool up to and including reserve_key as used.
Definition at line 4287 of file wallet.cpp.
bool CWallet::NewKeyPool | ( | ) |
Mark old keypool keys as used, and generate all new keys.
Definition at line 3889 of file wallet.cpp.
void CWallet::ReserveKeyFromKeyPool | ( | int64_t & | nIndex, |
CKeyPool & | keypool, | ||
bool | fRequestedInternal | ||
) |
void CWallet::ReturnKey | ( | int64_t | nIndex, |
bool | fInternal, | ||
const CPubKey & | pubkey | ||
) |
void CReserveKey::ReturnKey | ( | ) |
Definition at line 4278 of file wallet.cpp.
|
private |
bool CWallet::SelectAssetsMinConf | ( | const CAmount & | nTargetValue, |
const int | nConfMine, | ||
const int | nConfTheirs, | ||
const uint64_t | nMaxAncestors, | ||
const std::string & | strAssetName, | ||
std::vector< COutput > | vCoins, | ||
std::set< CInputCoin > & | setCoinsRet, | ||
CAmount & | nValueRet | ||
) | const |
Definition at line 2781 of file wallet.cpp.
|
private |
Select a set of coins such that nValueRet >= nTargetValue and at least all coins from coinControl are selected; Never select unconfirmed coins if they are not ours.
Definition at line 2686 of file wallet.cpp.
bool CWallet::SelectCoinsMinConf | ( | const CAmount & | nTargetValue, |
int | nConfMine, | ||
int | nConfTheirs, | ||
uint64_t | nMaxAncestors, | ||
std::vector< COutput > | vCoins, | ||
std::set< CInputCoin > & | setCoinsRet, | ||
CAmount & | nValueRet | ||
) | const |
Shuffle and select coins until nTargetValue is reached while avoiding small change; This method is stochastic for some inputs and upon completion the coin set and corresponding actual target value is assembled.
Definition at line 2580 of file wallet.cpp.
bool CWallet::SetAddressBook | ( | const CTxDestination & | address, |
const std::string & | strName, | ||
const std::string & | purpose | ||
) |
bool CWallet::SignTransaction | ( | CMutableTransaction & | tx | ) |
RVN END.
Definition at line 2987 of file wallet.cpp.
bool CWallet::TopUpKeyPool | ( | unsigned int | kpSize = 0 | ) |
Definition at line 3940 of file wallet.cpp.
void CWallet::UnlockAllCoins | ( | ) |
void CWallet::UnlockCoin | ( | const COutPoint & | output | ) |
DBErrors CWallet::ZapSelectTx | ( | std::vector< uint256 > & | vHashIn, |
std::vector< uint256 > & | vHashOut | ||
) |
Definition at line 3779 of file wallet.cpp.