Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
privatesend-util.h
Go to the documentation of this file.
56 CTransactionBuilderOutput(CTransactionBuilder* pTxBuilderIn, CWallet* pwalletIn, CAmount nAmountIn);
113 CAmount GetAmountLeft() const { return GetAmountInitial() - GetAmountUsed() - GetFee(GetBytesTotal()); }
std::vector< std::unique_ptr< CTransactionBuilderOutput > > vecOutputs
Contains all outputs already added to the transaction.
Definition: privatesend-util.h:97
CTransactionBuilderOutput(CTransactionBuilder *pTxBuilderIn, CWallet *pwalletIn, CAmount nAmountIn)
Definition: privatesend-util.cpp:86
bool fKeepKeys
Call KeepKey for all keys in destructor if fKeepKeys is true, call ReturnKey for all key if its false...
Definition: privatesend-util.h:93
bool Commit(std::string &strResult)
Create and Commit the transaction to the wallet.
Definition: privatesend-util.cpp:258
CTransactionBuilder(CWallet *pwalletIn, const CompactTallyItem &tallyItemIn)
Definition: privatesend-util.cpp:107
CCoinControl coinControl
See CTransactionBuilder() for initialization.
Definition: privatesend-util.h:81
void ReturnKey()
Tell the wallet to return the key used by this output to the keypool.
Definition: privatesend-util.h:68
int nBytesOutput
Contains the number of bytes required to add one output.
Definition: privatesend-util.h:91
Definition: privatesend-util.h:12
bool CouldAddOutputs(const std::vector< CAmount > &vecOutputAmounts) const
Check if its possible to add multiple outputs as vector of amounts. Returns true if its possible to a...
Definition: privatesend-util.cpp:186
CReserveKey key
Reserve key where the amount of this output will end up.
Definition: privatesend-util.h:49
CAmount GetAmountLeft() const
Get the amount currently left to add more outputs. Does respect fees.
Definition: privatesend-util.h:113
Enables simple transaction generation for a given CWallet object.
Definition: privatesend-util.h:76
CAmount GetAmountUsed() const
Get the amount currently used by added outputs. Does not include fees.
Definition: privatesend-util.cpp:223
CAmount GetAmountInitial() const
Get amount we had available when we started.
Definition: privatesend-util.h:111
CompactTallyItem tallyItem
Contains all utxos available to generate this transactions. They are all from the same address...
Definition: privatesend-util.h:87
CKeyHolder & operator=(CKeyHolder &&)=delete
int nBytesBase
Contains the number of bytes required for a transaction with only the inputs of tallyItems, no outputs.
Definition: privatesend-util.h:89
Definition: wallet.h:107
CScript GetScriptForDestination() const
Definition: privatesend-util.cpp:35
unsigned int GetBytesTotal() const
Get the total number of bytes used already by this transaction.
Definition: privatesend-util.cpp:212
CReserveKey dummyReserveKey
Dummy since we anyway use tallyItem's destination as change destination in coincontrol.
Definition: privatesend-util.h:85
std::vector< std::unique_ptr< CKeyHolder > > storage
Definition: privatesend-util.h:31
Definition: privatesend-util.h:28
bool IsDust(CAmount nAmount) const
Check if an amounts should be considered as dust.
Definition: privatesend-util.cpp:253
CTransactionBuilderOutput & operator=(CTransactionBuilderOutput &&)=delete
Used by CTransactionBuilder to represent its transaction outputs.
Definition: privatesend-util.h:44
CAmount GetFee(unsigned int nBytes) const
Get fees based on the number of bytes and the feerate set in CoinControl.
Definition: privatesend-util.cpp:232
bool CouldAddOutput(CAmount nAmountOutput) const
Check it would be possible to add a single output with the amount nAmount. Returns true if its possib...
Definition: privatesend-util.cpp:176
A CWallet is an extension of a keystore, which also maintains a set of transactions and balances...
Definition: wallet.h:715
void KeepKey()
Tell the wallet to remove the key used by this output from the keypool.
Definition: privatesend-util.h:66
void Clear()
Clear the output vector and keep/return the included keys depending on the value of fKeepKeys...
Definition: privatesend-util.cpp:155
CTransactionBuilderOutput * AddOutput(CAmount nAmountOutput=0)
Add an output with the amount nAmount. Returns a pointer to the output if it could be added and nullp...
Definition: privatesend-util.cpp:202
Wrapped mutex: supports recursive locking, but no waiting TODO: We should move away from using the re...
Definition: sync.h:94
int GetSizeOfCompactSizeDiff(size_t nAdd) const
Helper to get GetSizeOfCompactSizeDiff(vecOutputs.size(), vecOutputs.size() + nAdd) ...
Definition: privatesend-util.cpp:245
bool UpdateAmount(CAmount nAmount)
Try update the amount of this output. Returns true if it was successful and false if not (e...
Definition: privatesend-util.cpp:97