The code was using std::pair<const CWalletTx*, unsigned int> until now. Not only it is ugly to read, and easy to mess up, but it needlessly pass CWalletTx all around the code when it is not needed.
This code will simplify another PR extending FundRawTransaction. (https://github.com/bitcoin/bitcoin/pull/10068)
This is divided in 3 commits easy to review.
- Just rename
std::pair<const CWalletTx*, unsigned int>toCInputCoinby using a type alias - Transform
CInputCoininto a class. - Rewrite some code which can be simplified thanks to
CInputCoin