Changeset View
Changeset View
Standalone View
Standalone View
src/txmempool.cpp
Show All 20 Lines | |||||
#include <util/time.h> | #include <util/time.h> | ||||
#include <validation.h> | #include <validation.h> | ||||
#include <validationinterface.h> | #include <validationinterface.h> | ||||
#include <version.h> | #include <version.h> | ||||
#include <algorithm> | #include <algorithm> | ||||
#include <cmath> | #include <cmath> | ||||
CTxMemPoolEntry::CTxMemPoolEntry(const CTransactionRef &_tx, const Amount _nFee, | CTxMemPoolEntry::CTxMemPoolEntry(const CTransactionRef &_tx, const Amount fee, | ||||
int64_t _nTime, unsigned int _entryHeight, | int64_t time, unsigned int entry_height, | ||||
bool _spendsCoinbase, int64_t _sigOpsCount, | bool spends_coinbase, int64_t sigops_count, | ||||
LockPoints lp) | LockPoints lp) | ||||
: tx(_tx), nFee(_nFee), nTxSize(tx->GetTotalSize()), | : tx{_tx}, nFee{fee}, | ||||
nUsageSize(RecursiveDynamicUsage(tx)), nTime(_nTime), | nTxSize(tx->GetTotalSize()), nUsageSize{RecursiveDynamicUsage(tx)}, | ||||
entryHeight(_entryHeight), spendsCoinbase(_spendsCoinbase), | nTime(time), entryHeight{entry_height}, spendsCoinbase(spends_coinbase), | ||||
sigOpCount(_sigOpsCount), lockPoints(lp) { | sigOpCount(sigops_count), lockPoints(lp), | ||||
nCountWithDescendants = 1; | nSizeWithDescendants{GetTxSize()}, nModFeesWithDescendants{nFee}, | ||||
nSizeWithDescendants = GetTxSize(); | nSigOpCountWithDescendants{sigOpCount}, nSizeWithAncestors{GetTxSize()}, | ||||
nSigOpCountWithDescendants = sigOpCount; | nModFeesWithAncestors{nFee}, nSigOpCountWithAncestors{sigOpCount} {} | ||||
nModFeesWithDescendants = nFee; | |||||
feeDelta = Amount::zero(); | |||||
nCountWithAncestors = 1; | |||||
nSizeWithAncestors = GetTxSize(); | |||||
nModFeesWithAncestors = nFee; | |||||
nSigOpCountWithAncestors = sigOpCount; | |||||
} | |||||
size_t CTxMemPoolEntry::GetTxVirtualSize() const { | size_t CTxMemPoolEntry::GetTxVirtualSize() const { | ||||
return GetVirtualTransactionSize(nTxSize, sigOpCount); | return GetVirtualTransactionSize(nTxSize, sigOpCount); | ||||
} | } | ||||
uint64_t CTxMemPoolEntry::GetVirtualSizeWithDescendants() const { | uint64_t CTxMemPoolEntry::GetVirtualSizeWithDescendants() const { | ||||
// note this is distinct from the sum of descendants' individual virtual | // note this is distinct from the sum of descendants' individual virtual | ||||
// sizes, and may be smaller. | // sizes, and may be smaller. | ||||
▲ Show 20 Lines • Show All 1,432 Lines • Show Last 20 Lines |