While working on coin selection code, it occurred to me that CInputCoin
is really a subset of COutput
and the conversion of a COutput
to a CInputCoin
does not appear to be all that useful. So this PR adds fields that are present in CInputCoin
to COutput
and replaces the usage of CInputCoin
with COutput
.
COutput
is also moved to coinselection.h. As part of this move, the usage of CWalletTx
is removed from COutput
. It is instead replaced by storing a COutPoint
and the CTxOut
rather than the entire CWalletTx
as coin selection does not really need the full CWalletTx
. The CWalletTx
was only used for figuring out whether the transaction containing the output was from the current wallet, and for the transaction’s time. These are now parameters to COutput
’s constructor.