![]() |
Dash Core
0.12.2.1
P2P Digital Currency
|
#include <privatesend-client.h>
Public Member Functions | |
CPrivateSendClient () | |
void | ProcessMessage (CNode *pfrom, std::string &strCommand, CDataStream &vRecv, CConnman &connman) |
void | ClearSkippedDenominations () |
void | SetMinBlocksToWait (int nMinBlocksToWaitIn) |
void | ResetPool () |
void | UnlockCoins () |
std::string | GetStatus () |
bool | DoAutomaticDenominating (CConnman &connman, bool fDryRun=false) |
Passively run mixing in the background according to the configuration in settings. More... | |
void | CheckTimeout () |
void | NewBlock () |
Process a new block. More... | |
void | UpdatedBlockTip (const CBlockIndex *pindex) |
![]() | |
CPrivateSendBase () | |
int | GetQueueSize () const |
int | GetState () const |
std::string | GetStateString () const |
int | GetEntriesCount () const |
Public Attributes | |
int | nPrivateSendRounds |
int | nPrivateSendAmount |
int | nLiquidityProvider |
bool | fEnablePrivateSend |
bool | fPrivateSendMultiSession |
masternode_info_t | infoMixingMasternode |
int | nCachedNumBlocks |
bool | fCreateAutoBackups |
![]() | |
int | nSessionDenom |
Private Member Functions | |
void | CheckPool () |
Check for process. More... | |
void | CompletedTransaction (PoolMessage nMessageID) |
bool | IsDenomSkipped (CAmount nDenomValue) |
bool | WaitForAnotherBlock () |
bool | CheckAutomaticBackup () |
bool | JoinExistingQueue (CAmount nBalanceNeedsAnonymized, CConnman &connman) |
bool | StartNewQueue (CAmount nValueMin, CAmount nBalanceNeedsAnonymized, CConnman &connman) |
bool | CreateDenominated (CConnman &connman) |
Create denominations. More... | |
bool | CreateDenominated (const CompactTallyItem &tallyItem, bool fCreateMixingCollaterals, CConnman &connman) |
bool | MakeCollateralAmounts (CConnman &connman) |
Split up large inputs or make fee sized inputs. More... | |
bool | MakeCollateralAmounts (const CompactTallyItem &tallyItem, bool fTryDenominated, CConnman &connman) |
bool | SubmitDenominate (CConnman &connman) |
As a client, submit part of a future mixing transaction to a Masternode to start the process. More... | |
bool | PrepareDenominate (int nMinRounds, int nMaxRounds, std::string &strErrorRet, std::vector< CTxIn > &vecTxInRet, std::vector< CTxOut > &vecTxOutRet) |
step 1: prepare denominated inputs and outputs More... | |
bool | SendDenominate (const std::vector< CTxIn > &vecTxIn, const std::vector< CTxOut > &vecTxOut, CConnman &connman) |
step 2: send denominated inputs and outputs prepared in step 1 More... | |
bool | CheckPoolStateUpdate (PoolState nStateNew, int nEntriesCountNew, PoolStatusUpdate nStatusUpdate, PoolMessage nMessageID, int nSessionIDNew=0) |
Get Masternode updates about the progress of mixing. More... | |
void | SetState (PoolState nStateNew) |
bool | SignFinalTransaction (const CTransaction &finalTransactionNew, CNode *pnode, CConnman &connman) |
As a client, check and sign the final transaction. More... | |
void | RelayIn (const CDarkSendEntry &entry, CConnman &connman) |
void | SetNull () |
Private Attributes | |
CCriticalSection | cs_darksend |
std::vector< COutPoint > | vecMasternodesUsed |
std::vector< CAmount > | vecDenominationsSkipped |
std::vector< COutPoint > | vecOutPointLocked |
int | nCachedLastSuccessBlock |
int | nMinBlocksToWait |
int | nCachedBlockHeight |
int | nEntriesCount |
bool | fLastEntryAccepted |
std::string | strLastMessage |
std::string | strAutoDenomResult |
CMutableTransaction | txMyCollateral |
CKeyHolderStorage | keyHolderStorage |
Additional Inherited Members | |
![]() | |
void | SetNull () |
![]() | |
std::vector< CDarksendQueue > | vecDarksendQueue |
std::vector< CDarkSendEntry > | vecEntries |
PoolState | nState |
int64_t | nTimeLastSuccessfulStep |
int | nSessionID |
CMutableTransaction | finalMutableTransaction |
Used to keep track of current status of mixing pool
Definition at line 34 of file privatesend-client.h.
|
inline |
Definition at line 114 of file privatesend-client.h.
|
private |
Definition at line 627 of file privatesend-client.cpp.
Referenced by DoAutomaticDenominating().
|
private |
Check for process.
Definition at line 291 of file privatesend-client.cpp.
Referenced by CheckTimeout().
|
private |
Get Masternode updates about the progress of mixing.
Definition at line 442 of file privatesend-client.cpp.
Referenced by ProcessMessage().
void CPrivateSendClient::CheckTimeout | ( | ) |
Definition at line 309 of file privatesend-client.cpp.
Referenced by NewBlock(), and ThreadCheckPrivateSendClient().
|
inline |
Definition at line 128 of file privatesend-client.h.
Referenced by CWallet::CreateTransaction().
|
private |
Definition at line 599 of file privatesend-client.cpp.
Referenced by ProcessMessage().
|
private |
Create denominations.
Definition at line 1258 of file privatesend-client.cpp.
Referenced by DoAutomaticDenominating().
|
private |
Definition at line 1280 of file privatesend-client.cpp.
bool CPrivateSendClient::DoAutomaticDenominating | ( | CConnman & | connman, |
bool | fDryRun = false |
||
) |
Passively run mixing in the background according to the configuration in settings.
Definition at line 695 of file privatesend-client.cpp.
Referenced by privatesend(), OverviewPage::privateSendAuto(), and ThreadCheckPrivateSendClient().
std::string CPrivateSendClient::GetStatus | ( | ) |
Definition at line 239 of file privatesend-client.cpp.
Referenced by getpoolinfo(), privatesend(), and OverviewPage::privateSendStatus().
|
inlineprivate |
Definition at line 65 of file privatesend-client.h.
Referenced by CreateDenominated().
|
private |
Definition at line 845 of file privatesend-client.cpp.
Referenced by DoAutomaticDenominating().
|
private |
Split up large inputs or make fee sized inputs.
Definition at line 1160 of file privatesend-client.cpp.
Referenced by DoAutomaticDenominating().
|
private |
Definition at line 1186 of file privatesend-client.cpp.
void CPrivateSendClient::NewBlock | ( | ) |
Process a new block.
Definition at line 586 of file privatesend-client.cpp.
Referenced by UpdatedBlockTip().
|
private |
step 1: prepare denominated inputs and outputs
Definition at line 1039 of file privatesend-client.cpp.
Referenced by SubmitDenominate().
void CPrivateSendClient::ProcessMessage | ( | CNode * | pfrom, |
std::string & | strCommand, | ||
CDataStream & | vRecv, | ||
CConnman & | connman | ||
) |
Definition at line 21 of file privatesend-client.cpp.
Referenced by ProcessMessage().
|
private |
Definition at line 1386 of file privatesend-client.cpp.
Referenced by SendDenominate().
void CPrivateSendClient::ResetPool | ( | ) |
Definition at line 203 of file privatesend-client.cpp.
Referenced by privatesend(), and OverviewPage::privateSendReset().
|
private |
step 2: send denominated inputs and outputs prepared in step 1
Definition at line 362 of file privatesend-client.cpp.
Referenced by SubmitDenominate().
|
inline |
Definition at line 130 of file privatesend-client.h.
Referenced by AppInit2().
|
private |
Definition at line 213 of file privatesend-client.cpp.
Referenced by CheckPool(), CheckPoolStateUpdate(), CheckTimeout(), CompletedTransaction(), CPrivateSendClient(), DoAutomaticDenominating(), ResetPool(), SendDenominate(), and SignFinalTransaction().
|
private |
Definition at line 1397 of file privatesend-client.cpp.
Referenced by CheckPoolStateUpdate(), CheckTimeout(), JoinExistingQueue(), SendDenominate(), SignFinalTransaction(), and StartNewQueue().
|
private |
As a client, check and sign the final transaction.
Definition at line 488 of file privatesend-client.cpp.
Referenced by ProcessMessage().
|
private |
Definition at line 929 of file privatesend-client.cpp.
Referenced by DoAutomaticDenominating().
|
private |
As a client, submit part of a future mixing transaction to a Masternode to start the process.
Definition at line 1011 of file privatesend-client.cpp.
Referenced by ProcessMessage().
void CPrivateSendClient::UnlockCoins | ( | ) |
Definition at line 226 of file privatesend-client.cpp.
Referenced by CheckPool(), CheckPoolStateUpdate(), CheckTimeout(), CompletedTransaction(), DoAutomaticDenominating(), ResetPool(), SendDenominate(), SignFinalTransaction(), and OverviewPage::togglePrivateSend().
void CPrivateSendClient::UpdatedBlockTip | ( | const CBlockIndex * | pindex | ) |
Definition at line 1403 of file privatesend-client.cpp.
Referenced by CDSNotificationInterface::UpdatedBlockTip().
|
private |
Definition at line 616 of file privatesend-client.cpp.
Referenced by DoAutomaticDenominating(), and GetStatus().
|
mutableprivate |
Definition at line 37 of file privatesend-client.h.
Referenced by CheckTimeout(), DoAutomaticDenominating(), and ProcessMessage().
bool CPrivateSendClient::fCreateAutoBackups |
Definition at line 112 of file privatesend-client.h.
Referenced by CheckAutomaticBackup(), and OverviewPage::OverviewPage().
bool CPrivateSendClient::fEnablePrivateSend |
Definition at line 107 of file privatesend-client.h.
Referenced by AppInit2(), CheckAutomaticBackup(), CheckTimeout(), OverviewPage::DisablePrivateSendCompletely(), DoAutomaticDenominating(), CWallet::NewKeyPool(), OverviewPage::OverviewPage(), privatesend(), OverviewPage::privateSendStatus(), SendDenominate(), and OverviewPage::togglePrivateSend().
|
private |
Definition at line 52 of file privatesend-client.h.
Referenced by CheckPoolStateUpdate(), GetStatus(), and SetNull().
bool CPrivateSendClient::fPrivateSendMultiSession |
Definition at line 108 of file privatesend-client.h.
Referenced by AppInit2(), DoAutomaticDenominating(), getpoolinfo(), OptionsModel::Init(), OptionsModel::setData(), and WaitForAnotherBlock().
masternode_info_t CPrivateSendClient::infoMixingMasternode |
Definition at line 110 of file privatesend-client.h.
Referenced by getpoolinfo(), JoinExistingQueue(), ProcessMessage(), RelayIn(), SetNull(), SignFinalTransaction(), and StartNewQueue().
|
private |
Definition at line 59 of file privatesend-client.h.
Referenced by CheckPool(), CheckPoolStateUpdate(), CheckTimeout(), CompletedTransaction(), DoAutomaticDenominating(), PrepareDenominate(), ResetPool(), SendDenominate(), and SignFinalTransaction().
|
private |
Definition at line 49 of file privatesend-client.h.
Referenced by CompletedTransaction(), CreateDenominated(), MakeCollateralAmounts(), UpdatedBlockTip(), and WaitForAnotherBlock().
|
private |
Definition at line 45 of file privatesend-client.h.
Referenced by CompletedTransaction(), CreateDenominated(), MakeCollateralAmounts(), ResetPool(), and WaitForAnotherBlock().
int CPrivateSendClient::nCachedNumBlocks |
Definition at line 111 of file privatesend-client.h.
Referenced by OptionsDialog::on_okButton_clicked(), OverviewPage::privateSendStatus(), and OverviewPage::togglePrivateSend().
|
private |
Definition at line 51 of file privatesend-client.h.
Referenced by CheckPoolStateUpdate(), GetStatus(), ProcessMessage(), and SetNull().
int CPrivateSendClient::nLiquidityProvider |
Definition at line 106 of file privatesend-client.h.
Referenced by AppInit2(), and DoAutomaticDenominating().
|
private |
Definition at line 46 of file privatesend-client.h.
Referenced by SetMinBlocksToWait(), and WaitForAnotherBlock().
int CPrivateSendClient::nPrivateSendAmount |
Definition at line 105 of file privatesend-client.h.
Referenced by AppInit2(), DarksendConfig::configure(), DoAutomaticDenominating(), CWallet::GetNeedsToBeAnonymizedBalance(), OptionsModel::Init(), OptionsModel::setData(), OverviewPage::togglePrivateSend(), and OverviewPage::updatePrivateSendProgress().
int CPrivateSendClient::nPrivateSendRounds |
Definition at line 104 of file privatesend-client.h.
Referenced by AppInit2(), DarksendConfig::configure(), CWalletTx::GetAnonymizedCredit(), CWallet::GetNormalizedAnonymizedBalance(), CWallet::GetOutpointPrivateSendRounds(), OptionsModel::Init(), JoinExistingQueue(), WalletModel::pollBalanceChanged(), CWallet::SelectCoins(), CWallet::SelectCoinsGrouppedByAddresses(), OptionsModel::setData(), StartNewQueue(), SubmitDenominate(), OverviewPage::updatePrivateSendProgress(), and CoinControlDialog::viewItemChanged().
|
private |
Definition at line 55 of file privatesend-client.h.
Referenced by CheckAutomaticBackup(), CheckPoolStateUpdate(), CreateDenominated(), DoAutomaticDenominating(), GetStatus(), JoinExistingQueue(), StartNewQueue(), and SubmitDenominate().
|
private |
Definition at line 54 of file privatesend-client.h.
Referenced by CheckPoolStateUpdate(), CheckTimeout(), CompletedTransaction(), GetStatus(), and SendDenominate().
|
private |
Definition at line 57 of file privatesend-client.h.
Referenced by DoAutomaticDenominating(), JoinExistingQueue(), ResetPool(), SendDenominate(), and StartNewQueue().
|
private |
Definition at line 42 of file privatesend-client.h.
Referenced by ClearSkippedDenominations(), CreateDenominated(), and IsDenomSkipped().
|
private |
Definition at line 40 of file privatesend-client.h.
Referenced by DoAutomaticDenominating(), JoinExistingQueue(), ResetPool(), and StartNewQueue().
|
private |
Definition at line 43 of file privatesend-client.h.
Referenced by SendDenominate(), and UnlockCoins().