# Pastebin tmHUV2sU class CCoin { public: CCoin() { } CCoin(const CWalletTx* walletTx, unsigned int i) { if (walletTx != nullptr && i < walletTx->tx->vout.size()) { outpoint = COutPoint(walletTx->GetHash(), i); txout = walletTx->tx->vout[i]; } } bool IsNull() const { return outpoint.IsNull() && txout.IsNull(); } COutPoint outpoint; CTxOut txout; bool operator<(const CCoin &rhs) const { return outpoint < rhs.outpoint; } bool operator!=(const CCoin &rhs) const { return outpoint != rhs.outpoint; } bool operator==(const CCoin &rhs) const { return outpoint == rhs.outpoint; } };