aboutsummaryrefslogtreecommitdiff
path: root/src/txmempool.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2018-07-28 20:55:32 -0400
committerMarcoFalke <falke.marco@gmail.com>2018-07-30 08:57:49 -0400
commitddd395f968a050be5dd0ae21ba7d189b6b7f73fd (patch)
tree0d085986693b7394ff13ef7cf79ffd43cec5f17e /src/txmempool.cpp
parentfa5ed4f8d2c4cb3507bcc2460725d483f2e5789c (diff)
downloadbitcoin-ddd395f968a050be5dd0ae21ba7d189b6b7f73fd.tar.xz
Mark CTxMemPoolEntry members that should not be modified const
Diffstat (limited to 'src/txmempool.cpp')
-rw-r--r--src/txmempool.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index d68c38ad4e..257c88e5b2 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -20,13 +20,10 @@
CTxMemPoolEntry::CTxMemPoolEntry(const CTransactionRef& _tx, const CAmount& _nFee,
int64_t _nTime, unsigned int _entryHeight,
- bool _spendsCoinbase, int64_t _sigOpsCost, LockPoints lp):
- tx(_tx), nFee(_nFee), nTime(_nTime), entryHeight(_entryHeight),
+ bool _spendsCoinbase, int64_t _sigOpsCost, LockPoints lp)
+ : tx(_tx), nFee(_nFee), nTxWeight(GetTransactionWeight(*tx)), nUsageSize(RecursiveDynamicUsage(tx)), nTime(_nTime), entryHeight(_entryHeight),
spendsCoinbase(_spendsCoinbase), sigOpCost(_sigOpsCost), lockPoints(lp)
{
- nTxWeight = GetTransactionWeight(*tx);
- nUsageSize = RecursiveDynamicUsage(tx);
-
nCountWithDescendants = 1;
nSizeWithDescendants = GetTxSize();
nModFeesWithDescendants = nFee;