Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
Used by CTransactionBuilder to represent its transaction outputs. More...
#include <privatesend-util.h>
Public Member Functions | |
CTransactionBuilderOutput (CTransactionBuilder *pTxBuilderIn, CWallet *pwalletIn, CAmount nAmountIn) | |
CTransactionBuilderOutput (CTransactionBuilderOutput &&)=delete | |
CTransactionBuilderOutput & | operator= (CTransactionBuilderOutput &&)=delete |
CScript | GetScript () const |
Get the scriptPubKey of this output. More... | |
CAmount | GetAmount () const |
Get the amount of this output. More... | |
bool | UpdateAmount (CAmount nAmount) |
Try update the amount of this output. Returns true if it was successful and false if not (e.g. insufficient amount left). More... | |
void | KeepKey () |
Tell the wallet to remove the key used by this output from the keypool. More... | |
void | ReturnKey () |
Tell the wallet to return the key used by this output to the keypool. More... | |
Private Attributes | |
CTransactionBuilder * | pTxBuilder {nullptr} |
Used for amount updates. More... | |
CReserveKey | key |
Reserve key where the amount of this output will end up. More... | |
CAmount | nAmount {0} |
Amount this output will receive. More... | |
CScript | script |
ScriptPubKey of this output. More... | |
Detailed Description
Used by CTransactionBuilder to represent its transaction outputs.
It creates a CReserveKey for the given CWallet as destination.
Definition at line 44 of file privatesend-util.h.
Constructor & Destructor Documentation
◆ CTransactionBuilderOutput() [1/2]
CTransactionBuilderOutput::CTransactionBuilderOutput | ( | CTransactionBuilder * | pTxBuilderIn, |
CWallet * | pwalletIn, | ||
CAmount | nAmountIn | ||
) |
Definition at line 86 of file privatesend-util.cpp.
References CPubKey::GetID(), CReserveKey::GetReservedKey(), GetScriptForDestination(), key, pTxBuilder, and script.
◆ CTransactionBuilderOutput() [2/2]
|
delete |
Member Function Documentation
◆ GetAmount()
|
inline |
Get the amount of this output.
Definition at line 62 of file privatesend-util.h.
References nAmount.
Referenced by CPrivateSendClientSession::MakeCollateralAmounts().
◆ GetScript()
|
inline |
Get the scriptPubKey of this output.
Definition at line 60 of file privatesend-util.h.
References script.
◆ KeepKey()
|
inline |
Tell the wallet to remove the key used by this output from the keypool.
Definition at line 66 of file privatesend-util.h.
References CReserveKey::KeepKey(), and key.
◆ operator=()
|
delete |
◆ ReturnKey()
|
inline |
Tell the wallet to return the key used by this output to the keypool.
Definition at line 68 of file privatesend-util.h.
References key, and CReserveKey::ReturnKey().
◆ UpdateAmount()
bool CTransactionBuilderOutput::UpdateAmount | ( | CAmount | nAmount | ) |
Try update the amount of this output. Returns true if it was successful and false if not (e.g. insufficient amount left).
Definition at line 97 of file privatesend-util.cpp.
References CTransactionBuilder::cs_outputs, CTransactionBuilder::GetAmountLeft(), LOCK, nAmount, and pTxBuilder.
Referenced by CPrivateSendClientSession::MakeCollateralAmounts().
Member Data Documentation
◆ key
|
private |
Reserve key where the amount of this output will end up.
Definition at line 49 of file privatesend-util.h.
Referenced by CTransactionBuilderOutput(), KeepKey(), and ReturnKey().
◆ nAmount
|
private |
Amount this output will receive.
Definition at line 51 of file privatesend-util.h.
Referenced by GetAmount(), and UpdateAmount().
◆ pTxBuilder
|
private |
Used for amount updates.
Definition at line 47 of file privatesend-util.h.
Referenced by CTransactionBuilderOutput(), and UpdateAmount().
◆ script
|
private |
ScriptPubKey of this output.
Definition at line 53 of file privatesend-util.h.
Referenced by CTransactionBuilderOutput(), and GetScript().
The documentation for this class was generated from the following files:
- src/privatesend/privatesend-util.h
- src/privatesend/privatesend-util.cpp