diff options
author | Andrew Chow <achow101-github@achow101.com> | 2022-01-17 16:19:30 -0500 |
---|---|---|
committer | Andrew Chow <achow101-github@achow101.com> | 2022-03-23 15:01:38 -0400 |
commit | 14fbb57b79c664090f6a4e60d7bdfc9759ff4307 (patch) | |
tree | d491854cb9b90388a194c1ca303738690a9c0044 /src/wallet/coinselection.h | |
parent | f0821230b8de2eec21a869d1edf9e2b9f502de25 (diff) |
coinselection: Add effective value and fees to COutput
Diffstat (limited to 'src/wallet/coinselection.h')
-rw-r--r-- | src/wallet/coinselection.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/wallet/coinselection.h b/src/wallet/coinselection.h index 7f375b6169..5dbb63310c 100644 --- a/src/wallet/coinselection.h +++ b/src/wallet/coinselection.h @@ -110,6 +110,15 @@ public: /** Whether the transaction containing this output is sent from the owning wallet */ 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) : outpoint(outpoint), txout(txout), @@ -119,7 +128,8 @@ public: solvable(solvable), safe(safe), time(time), - from_me(from_me) + from_me(from_me), + effective_value(txout.nValue) {} std::string ToString() const; |