Changeset View
Changeset View
Standalone View
Standalone View
src/txmempool.cpp
Show All 20 Lines | |||||
#include <util/system.h> | #include <util/system.h> | ||||
#include <util/time.h> | #include <util/time.h> | ||||
#include <validation.h> | #include <validation.h> | ||||
#include <version.h> | #include <version.h> | ||||
#include <algorithm> | #include <algorithm> | ||||
CTxMemPoolEntry::CTxMemPoolEntry(const CTransactionRef &_tx, const Amount _nFee, | CTxMemPoolEntry::CTxMemPoolEntry(const CTransactionRef &_tx, const Amount _nFee, | ||||
int64_t _nTime, double _entryPriority, | int64_t _nTime, unsigned int _entryHeight, | ||||
unsigned int _entryHeight, | |||||
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), entryHeight(_entryHeight), | ||||
entryHeight(_entryHeight), inChainInputValue(_inChainInputValue), | |||||
spendsCoinbase(_spendsCoinbase), sigOpCount(_sigOpsCount), | spendsCoinbase(_spendsCoinbase), sigOpCount(_sigOpsCount), | ||||
lockPoints(lp) { | lockPoints(lp) { | ||||
nTxSize = tx->GetTotalSize(); | nTxSize = tx->GetTotalSize(); | ||||
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; | |||||
assert(inChainInputValue <= nValueIn); | |||||
feeDelta = Amount::zero(); | feeDelta = Amount::zero(); | ||||
nCountWithAncestors = 1; | nCountWithAncestors = 1; | ||||
nSizeWithAncestors = GetTxSize(); | nSizeWithAncestors = GetTxSize(); | ||||
nModFeesWithAncestors = nFee; | nModFeesWithAncestors = nFee; | ||||
nSigOpCountWithAncestors = sigOpCount; | nSigOpCountWithAncestors = sigOpCount; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 1,349 Lines • Show Last 20 Lines |