|
|
@ -19,9 +19,7 @@ static constexpr CAmount MIN_CHANGE{COIN / 100};
|
|
|
|
static const CAmount MIN_FINAL_CHANGE = MIN_CHANGE/2;
|
|
|
|
static const CAmount MIN_FINAL_CHANGE = MIN_CHANGE/2;
|
|
|
|
|
|
|
|
|
|
|
|
/** A UTXO under consideration for use in funding a new transaction. */
|
|
|
|
/** A UTXO under consideration for use in funding a new transaction. */
|
|
|
|
class COutput
|
|
|
|
struct COutput {
|
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
/** The outpoint identifying this UTXO */
|
|
|
|
/** The outpoint identifying this UTXO */
|
|
|
|
COutPoint outpoint;
|
|
|
|
COutPoint outpoint;
|
|
|
|
|
|
|
|
|
|
|
@ -67,21 +65,22 @@ public:
|
|
|
|
CAmount long_term_fee{0};
|
|
|
|
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},
|
|
|
|
depth(depth),
|
|
|
|
depth{depth},
|
|
|
|
input_bytes(input_bytes),
|
|
|
|
input_bytes{input_bytes},
|
|
|
|
spendable(spendable),
|
|
|
|
spendable{spendable},
|
|
|
|
solvable(solvable),
|
|
|
|
solvable{solvable},
|
|
|
|
safe(safe),
|
|
|
|
safe{safe},
|
|
|
|
time(time),
|
|
|
|
time{time},
|
|
|
|
from_me(from_me),
|
|
|
|
from_me{from_me},
|
|
|
|
effective_value(txout.nValue)
|
|
|
|
effective_value{txout.nValue}
|
|
|
|
{}
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
|
|
std::string ToString() const;
|
|
|
|
std::string ToString() const;
|
|
|
|
|
|
|
|
|
|
|
|
bool operator<(const COutput& rhs) const {
|
|
|
|
bool operator<(const COutput& rhs) const
|
|
|
|
|
|
|
|
{
|
|
|
|
return outpoint < rhs.outpoint;
|
|
|
|
return outpoint < rhs.outpoint;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|