Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.h
Show First 20 Lines • Show All 476 Lines • ▼ Show 20 Lines | public: | ||||
*/ | */ | ||||
bool AcceptToMemoryPool(const Amount nAbsurdFee, CValidationState &state); | bool AcceptToMemoryPool(const Amount nAbsurdFee, CValidationState &state); | ||||
std::set<TxId> GetConflicts() const; | std::set<TxId> GetConflicts() const; | ||||
}; | }; | ||||
class CInputCoin { | class CInputCoin { | ||||
public: | public: | ||||
CInputCoin(const CWalletTx *walletTx, unsigned int i) : wtx(walletTx) { | CInputCoin(const CWalletTx *walletTx, unsigned int i) { | ||||
if (!walletTx) { | if (!walletTx) { | ||||
throw std::invalid_argument("walletTx should not be null"); | throw std::invalid_argument("walletTx should not be null"); | ||||
} | } | ||||
if (i >= walletTx->tx->vout.size()) { | if (i >= walletTx->tx->vout.size()) { | ||||
throw std::out_of_range("The output index is out of range"); | throw std::out_of_range("The output index is out of range"); | ||||
} | } | ||||
outpoint = COutPoint(walletTx->GetId(), i); | outpoint = COutPoint(walletTx->GetId(), i); | ||||
txout = walletTx->tx->vout[i]; | txout = walletTx->tx->vout[i]; | ||||
} | } | ||||
COutPoint outpoint; | COutPoint outpoint; | ||||
CTxOut txout; | CTxOut txout; | ||||
const CWalletTx *wtx; | |||||
bool operator<(const CInputCoin &rhs) const { | bool operator<(const CInputCoin &rhs) const { | ||||
return outpoint < rhs.outpoint; | return outpoint < rhs.outpoint; | ||||
} | } | ||||
bool operator!=(const CInputCoin &rhs) const { | bool operator!=(const CInputCoin &rhs) const { | ||||
return outpoint != rhs.outpoint; | return outpoint != rhs.outpoint; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 881 Lines • Show Last 20 Lines |