Bitcoin Core 28.99.0
P2P Digital Currency
|
A UTXO under consideration for use in funding a new transaction. More...
#include <coinselection.h>
Public Member Functions | |
COutput (const COutPoint &outpoint, const CTxOut &txout, int depth, int input_bytes, bool spendable, bool solvable, bool safe, int64_t time, bool from_me, const std::optional< CFeeRate > feerate=std::nullopt) | |
COutput (const COutPoint &outpoint, const CTxOut &txout, int depth, int input_bytes, bool spendable, bool solvable, bool safe, int64_t time, bool from_me, const CAmount fees) | |
std::string | ToString () const |
bool | operator< (const COutput &rhs) const |
void | ApplyBumpFee (CAmount bump_fee) |
CAmount | GetFee () const |
CAmount | GetEffectiveValue () const |
bool | HasEffectiveValue () const |
Public Attributes | |
COutPoint | outpoint |
The outpoint identifying this UTXO. More... | |
CTxOut | txout |
The output itself. More... | |
int | depth |
Depth in block chain. More... | |
int | input_bytes |
Pre-computed estimated size of this output as a fully-signed input in a transaction. More... | |
bool | spendable |
Whether we have the private keys to spend this output. More... | |
bool | solvable |
Whether we know how to spend this output, ignoring the lack of keys. More... | |
bool | safe |
Whether this output is considered safe to spend. More... | |
int64_t | time |
The time of the transaction containing this output as determined by CWalletTx::nTimeSmart. More... | |
bool | from_me |
Whether the transaction containing this output is sent from the owning wallet. More... | |
CAmount | long_term_fee {0} |
The fee required to spend this output at the consolidation feerate. More... | |
CAmount | ancestor_bump_fees {0} |
The fee necessary to bump this UTXO's ancestor transactions to the target feerate. More... | |
Private Attributes | |
std::optional< CAmount > | effective_value |
The output's value minus fees required to spend it and bump its unconfirmed ancestors to the target feerate. More... | |
std::optional< CAmount > | fee |
The fee required to spend this output at the transaction's target feerate and to bump its unconfirmed ancestors to the target feerate. More... | |
A UTXO under consideration for use in funding a new transaction.
Definition at line 28 of file coinselection.h.
|
inline |
Definition at line 78 of file coinselection.h.
|
inline |
Definition at line 112 of file coinselection.h.
|
inline |
Definition at line 128 of file coinselection.h.
|
inline |
Definition at line 122 of file coinselection.h.
|
inline |
Definition at line 134 of file coinselection.h.
|
inline |
Definition at line 107 of file coinselection.h.
std::string wallet::COutput::ToString | ( | ) | const |
CAmount wallet::COutput::ancestor_bump_fees {0} |
The fee necessary to bump this UTXO's ancestor transactions to the target feerate.
Definition at line 76 of file coinselection.h.
int wallet::COutput::depth |
Depth in block chain.
If > 0: the tx is on chain and has this many confirmations. If = 0: the tx is waiting confirmation. If < 0: a conflicting tx is on chain and has this many confirmations.
Definition at line 48 of file coinselection.h.
|
private |
The output's value minus fees required to spend it and bump its unconfirmed ancestors to the target feerate.
Definition at line 31 of file coinselection.h.
|
private |
The fee required to spend this output at the transaction's target feerate and to bump its unconfirmed ancestors to the target feerate.
Definition at line 34 of file coinselection.h.
bool wallet::COutput::from_me |
Whether the transaction containing this output is sent from the owning wallet.
Definition at line 70 of file coinselection.h.
int wallet::COutput::input_bytes |
Pre-computed estimated size of this output as a fully-signed input in a transaction.
Can be -1 if it could not be calculated
Definition at line 51 of file coinselection.h.
CAmount wallet::COutput::long_term_fee {0} |
The fee required to spend this output at the consolidation feerate.
Definition at line 73 of file coinselection.h.
COutPoint wallet::COutput::outpoint |
The outpoint identifying this UTXO.
Definition at line 38 of file coinselection.h.
bool wallet::COutput::safe |
Whether this output is considered safe to spend.
Unconfirmed transactions from outside keys and unconfirmed replacement transactions are considered unsafe and will not be used to fund new spending transactions.
Definition at line 64 of file coinselection.h.
bool wallet::COutput::solvable |
Whether we know how to spend this output, ignoring the lack of keys.
Definition at line 57 of file coinselection.h.
bool wallet::COutput::spendable |
Whether we have the private keys to spend this output.
Definition at line 54 of file coinselection.h.
int64_t wallet::COutput::time |
The time of the transaction containing this output as determined by CWalletTx::nTimeSmart.
Definition at line 67 of file coinselection.h.
CTxOut wallet::COutput::txout |
The output itself.
Definition at line 41 of file coinselection.h.