Changeset View
Changeset View
Standalone View
Standalone View
src/txmempool.cpp
Show All 26 Lines | CTxMemPoolEntry::CTxMemPoolEntry(const CTransactionRef &_tx, const Amount _nFee, | ||||
Amount _inChainInputValue, | Amount _inChainInputValue, | ||||
bool _spendsCoinbase, int64_t _sigOpsCount, | bool _spendsCoinbase, int64_t _sigOpsCount, | ||||
LockPoints lp) | LockPoints lp) | ||||
: tx(_tx), nFee(_nFee), nTime(_nTime), entryPriority(_entryPriority), | : tx(_tx), nFee(_nFee), nTime(_nTime), entryPriority(_entryPriority), | ||||
entryHeight(_entryHeight), inChainInputValue(_inChainInputValue), | entryHeight(_entryHeight), inChainInputValue(_inChainInputValue), | ||||
spendsCoinbase(_spendsCoinbase), sigOpCount(_sigOpsCount), | spendsCoinbase(_spendsCoinbase), sigOpCount(_sigOpsCount), | ||||
lockPoints(lp) { | lockPoints(lp) { | ||||
nTxSize = tx->GetTotalSize(); | nTxSize = tx->GetTotalSize(); | ||||
nTxBillableSize = tx->GetBillableSize(); | |||||
nModSize = tx->CalculateModifiedSize(GetTxSize()); | nModSize = tx->CalculateModifiedSize(GetTxSize()); | ||||
nUsageSize = RecursiveDynamicUsage(tx); | nUsageSize = RecursiveDynamicUsage(tx); | ||||
nCountWithDescendants = 1; | nCountWithDescendants = 1; | ||||
nSizeWithDescendants = GetTxSize(); | nSizeWithDescendants = GetTxSize(); | ||||
nModFeesWithDescendants = nFee; | nModFeesWithDescendants = nFee; | ||||
Amount nValueIn = tx->GetValueOut() + nFee; | Amount nValueIn = tx->GetValueOut() + nFee; | ||||
assert(inChainInputValue <= nValueIn); | assert(inChainInputValue <= nValueIn); | ||||
▲ Show 20 Lines • Show All 845 Lines • ▼ Show 20 Lines | void CTxMemPool::queryHashes(std::vector<uint256> &vtxid) { | ||||
for (auto it : iters) { | for (auto it : iters) { | ||||
vtxid.push_back(it->GetTx().GetId()); | vtxid.push_back(it->GetTx().GetId()); | ||||
} | } | ||||
} | } | ||||
static TxMempoolInfo | static TxMempoolInfo | ||||
GetInfo(CTxMemPool::indexed_transaction_set::const_iterator it) { | GetInfo(CTxMemPool::indexed_transaction_set::const_iterator it) { | ||||
return TxMempoolInfo{it->GetSharedTx(), it->GetTime(), | return TxMempoolInfo{it->GetSharedTx(), it->GetTime(), | ||||
CFeeRate(it->GetFee(), it->GetTxSize()), | CFeeRate(it->GetFee(), it->GetTxBillableSize()), | ||||
it->GetModifiedFee() - it->GetFee()}; | it->GetModifiedFee() - it->GetFee()}; | ||||
} | } | ||||
std::vector<TxMempoolInfo> CTxMemPool::infoAll() const { | std::vector<TxMempoolInfo> CTxMemPool::infoAll() const { | ||||
LOCK(cs); | LOCK(cs); | ||||
auto iters = GetSortedDepthAndScore(); | auto iters = GetSortedDepthAndScore(); | ||||
std::vector<TxMempoolInfo> ret; | std::vector<TxMempoolInfo> ret; | ||||
▲ Show 20 Lines • Show All 348 Lines • Show Last 20 Lines |