Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

CTransactionBuilderOutput Class Reference

Used by CTransactionBuilder to represent its transaction outputs. More...

#include <privatesend-util.h>

+ Collaboration diagram for CTransactionBuilderOutput:

Public Member Functions

 CTransactionBuilderOutput (CTransactionBuilder *pTxBuilderIn, CWallet *pwalletIn, CAmount nAmountIn)
 
 CTransactionBuilderOutput (CTransactionBuilderOutput &&)=delete
 
CTransactionBuilderOutputoperator= (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

CTransactionBuilderpTxBuilder {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 
)

◆ CTransactionBuilderOutput() [2/2]

CTransactionBuilderOutput::CTransactionBuilderOutput ( CTransactionBuilderOutput &&  )
delete

Member Function Documentation

◆ GetAmount()

CAmount CTransactionBuilderOutput::GetAmount ( ) const
inline

Get the amount of this output.

Definition at line 62 of file privatesend-util.h.

References nAmount.

Referenced by CPrivateSendClientSession::MakeCollateralAmounts().

◆ GetScript()

CScript CTransactionBuilderOutput::GetScript ( ) const
inline

Get the scriptPubKey of this output.

Definition at line 60 of file privatesend-util.h.

References script.

◆ KeepKey()

void CTransactionBuilderOutput::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=()

CTransactionBuilderOutput& CTransactionBuilderOutput::operator= ( CTransactionBuilderOutput &&  )
delete

◆ ReturnKey()

void CTransactionBuilderOutput::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

CReserveKey CTransactionBuilderOutput::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

CAmount CTransactionBuilderOutput::nAmount {0}
private

Amount this output will receive.

Definition at line 51 of file privatesend-util.h.

Referenced by GetAmount(), and UpdateAmount().

◆ pTxBuilder

CTransactionBuilder* CTransactionBuilderOutput::pTxBuilder {nullptr}
private

Used for amount updates.

Definition at line 47 of file privatesend-util.h.

Referenced by CTransactionBuilderOutput(), and UpdateAmount().

◆ script

CScript CTransactionBuilderOutput::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:
Released under the MIT license