aboutsummaryrefslogtreecommitdiff
path: root/src/txmempool.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2017-01-04 12:22:49 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2017-01-04 12:23:10 +0100
commit869781c51cc1b6ee0a8635bcefbcbe11db7f5b25 (patch)
tree9f566f00ccb67f888c6e5a8026215fed51169514 /src/txmempool.cpp
parentd9ae1cefa081c7ef978fab0b288475692678af72 (diff)
parent91335ba389918966c94eeb7071b6c5a998bf1be8 (diff)
downloadbitcoin-869781c51cc1b6ee0a8635bcefbcbe11db7f5b25.tar.xz
Merge #9283: A few more CTransactionRef optimizations
91335ba Remove unused MakeTransactionRef overloads (Pieter Wuille) 6713f0f Make FillBlock consume txn_available to avoid shared_ptr copies (Pieter Wuille) 62607d7 Convert COrphanTx to keep a CTransactionRef (Pieter Wuille) c44e4c4 Make AcceptToMemoryPool take CTransactionRef (Pieter Wuille)
Diffstat (limited to 'src/txmempool.cpp')
-rw-r--r--src/txmempool.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index fa9798a3ec..a8ca0e2da4 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -20,22 +20,22 @@
using namespace std;
-CTxMemPoolEntry::CTxMemPoolEntry(const CTransaction& _tx, const CAmount& _nFee,
+CTxMemPoolEntry::CTxMemPoolEntry(const CTransactionRef& _tx, const CAmount& _nFee,
int64_t _nTime, double _entryPriority, unsigned int _entryHeight,
bool poolHasNoInputsOf, CAmount _inChainInputValue,
bool _spendsCoinbase, int64_t _sigOpsCost, LockPoints lp):
- tx(MakeTransactionRef(_tx)), nFee(_nFee), nTime(_nTime), entryPriority(_entryPriority), entryHeight(_entryHeight),
+ tx(_tx), nFee(_nFee), nTime(_nTime), entryPriority(_entryPriority), entryHeight(_entryHeight),
hadNoDependencies(poolHasNoInputsOf), inChainInputValue(_inChainInputValue),
spendsCoinbase(_spendsCoinbase), sigOpCost(_sigOpsCost), lockPoints(lp)
{
- nTxWeight = GetTransactionWeight(_tx);
- nModSize = _tx.CalculateModifiedSize(GetTxSize());
+ nTxWeight = GetTransactionWeight(*tx);
+ nModSize = tx->CalculateModifiedSize(GetTxSize());
nUsageSize = RecursiveDynamicUsage(*tx) + memusage::DynamicUsage(tx);
nCountWithDescendants = 1;
nSizeWithDescendants = GetTxSize();
nModFeesWithDescendants = nFee;
- CAmount nValueIn = _tx.GetValueOut()+nFee;
+ CAmount nValueIn = tx->GetValueOut()+nFee;
assert(inChainInputValue <= nValueIn);
feeDelta = 0;