mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-21 14:34:49 +01:00
coinselection: Add effective value and fees to COutput
This commit is contained in:
parent
f0821230b8
commit
14fbb57b79
1 changed files with 11 additions and 1 deletions
|
@ -110,6 +110,15 @@ public:
|
||||||
/** Whether the transaction containing this output is sent from the owning wallet */
|
/** Whether the transaction containing this output is sent from the owning wallet */
|
||||||
bool from_me;
|
bool from_me;
|
||||||
|
|
||||||
|
/** The output's value minus fees required to spend it. Initialized as the output's absolute value. */
|
||||||
|
CAmount effective_value;
|
||||||
|
|
||||||
|
/** The fee required to spend this output at the transaction's target feerate. */
|
||||||
|
CAmount fee{0};
|
||||||
|
|
||||||
|
/** The fee required to spend this output at the consolidation feerate. */
|
||||||
|
CAmount long_term_fee{0};
|
||||||
|
|
||||||
COutput(const COutPoint& outpoint, const CTxOut& txout, int depth, int input_bytes, bool spendable, bool solvable, bool safe, int64_t time, bool from_me)
|
COutput(const COutPoint& outpoint, const CTxOut& txout, int depth, int input_bytes, bool spendable, bool solvable, bool safe, int64_t time, bool from_me)
|
||||||
: outpoint(outpoint),
|
: outpoint(outpoint),
|
||||||
txout(txout),
|
txout(txout),
|
||||||
|
@ -119,7 +128,8 @@ public:
|
||||||
solvable(solvable),
|
solvable(solvable),
|
||||||
safe(safe),
|
safe(safe),
|
||||||
time(time),
|
time(time),
|
||||||
from_me(from_me)
|
from_me(from_me),
|
||||||
|
effective_value(txout.nValue)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
std::string ToString() const;
|
std::string ToString() const;
|
||||||
|
|
Loading…
Add table
Reference in a new issue