@@ -86,7 +86,7 @@ CTxMemPoolEntry::CTxMemPoolEntry(const CTransactionRef& tx, CAmount fee,
8686 bool spends_coinbase, int64_t sigops_cost, LockPoints lp)
8787 : tx{tx},
8888 nFee{fee},
89- nTxWeight ( GetTransactionWeight(*tx)) ,
89+ nTxWeight{ GetTransactionWeight (*tx)} ,
9090 nUsageSize{RecursiveDynamicUsage (tx)},
9191 nTime{time},
9292 entryHeight{entry_height},
@@ -111,7 +111,7 @@ void CTxMemPoolEntry::UpdateLockPoints(const LockPoints& lp)
111111 lockPoints = lp;
112112}
113113
114- size_t CTxMemPoolEntry::GetTxSize () const
114+ int64_t CTxMemPoolEntry::GetTxSize () const
115115{
116116 return GetVirtualTransactionSize (nTxWeight, sigOpCost);
117117}
@@ -150,12 +150,12 @@ void CTxMemPool::UpdateForDescendants(txiter updateIt, cacheMap &cachedDescendan
150150 int64_t modifyCount = 0 ;
151151 for (const CTxMemPoolEntry& descendant : descendants) {
152152 if (!setExclude.count (descendant.GetTx ().GetHash ())) {
153- modifySize += int64_t ( descendant.GetTxSize () );
153+ modifySize += descendant.GetTxSize ();
154154 modifyFee += descendant.GetModifiedFee ();
155155 modifyCount++;
156156 cachedDescendants[updateIt].insert (mapTx.iterator_to (descendant));
157157 // Update ancestor state for each descendant
158- mapTx.modify (mapTx.iterator_to (descendant), update_ancestor_state{int64_t ( updateIt->GetTxSize () ), updateIt->GetModifiedFee (), 1 , updateIt->GetSigOpCost ()});
158+ mapTx.modify (mapTx.iterator_to (descendant), update_ancestor_state{updateIt->GetTxSize (), updateIt->GetModifiedFee (), 1 , updateIt->GetSigOpCost ()});
159159 }
160160 }
161161 mapTx.modify (updateIt, update_descendant_state (modifySize, modifyFee, modifyCount));
@@ -342,7 +342,7 @@ void CTxMemPool::UpdateAncestorsOf(bool add, txiter it, setEntries &setAncestors
342342 UpdateChild (mapTx.iterator_to (parent), it, add);
343343 }
344344 const int64_t updateCount = (add ? 1 : -1 );
345- const int64_t updateSize{updateCount * int64_t ( it->GetTxSize () )};
345+ const int64_t updateSize{updateCount * it->GetTxSize ()};
346346 const CAmount updateFee = updateCount * it->GetModifiedFee ();
347347 for (txiter ancestorIt : setAncestors) {
348348 mapTx.modify (ancestorIt, update_descendant_state (updateSize, updateFee, updateCount));
@@ -356,7 +356,7 @@ void CTxMemPool::UpdateEntryForAncestors(txiter it, const setEntries &setAncesto
356356 CAmount updateFee = 0 ;
357357 int64_t updateSigOpsCost = 0 ;
358358 for (txiter ancestorIt : setAncestors) {
359- updateSize += int64_t ( ancestorIt->GetTxSize () );
359+ updateSize += ancestorIt->GetTxSize ();
360360 updateFee += ancestorIt->GetModifiedFee ();
361361 updateSigOpsCost += ancestorIt->GetSigOpCost ();
362362 }
@@ -433,17 +433,17 @@ void CTxMemPool::UpdateForRemoveFromMempool(const setEntries &entriesToRemove, b
433433
434434void CTxMemPoolEntry::UpdateDescendantState (int64_t modifySize, CAmount modifyFee, int64_t modifyCount)
435435{
436- nSizeWithDescendants += uint64_t ( modifySize) ;
437- assert (int64_t ( nSizeWithDescendants) > 0 );
436+ nSizeWithDescendants += modifySize;
437+ assert (nSizeWithDescendants > 0 );
438438 nModFeesWithDescendants += modifyFee;
439439 nCountWithDescendants += uint64_t (modifyCount);
440440 assert (int64_t (nCountWithDescendants) > 0 );
441441}
442442
443443void CTxMemPoolEntry::UpdateAncestorState (int64_t modifySize, CAmount modifyFee, int64_t modifyCount, int64_t modifySigOps)
444444{
445- nSizeWithAncestors += uint64_t ( modifySize) ;
446- assert (int64_t ( nSizeWithAncestors) > 0 );
445+ nSizeWithAncestors += modifySize;
446+ assert (nSizeWithAncestors > 0 );
447447 nModFeesWithAncestors += modifyFee;
448448 nCountWithAncestors += uint64_t (modifyCount);
449449 assert (int64_t (nCountWithAncestors) > 0 );
@@ -764,7 +764,7 @@ void CTxMemPool::check(const CCoinsViewCache& active_coins_tip, int64_t spendhei
764764 std::string dummy;
765765 CalculateMemPoolAncestors (*it, setAncestors, nNoLimit, nNoLimit, nNoLimit, nNoLimit, dummy);
766766 uint64_t nCountCheck = setAncestors.size () + 1 ;
767- uint64_t nSizeCheck = it->GetTxSize ();
767+ int64_t nSizeCheck{ it->GetTxSize ()} ;
768768 CAmount nFeesCheck = it->GetModifiedFee ();
769769 int64_t nSigOpCheck = it->GetSigOpCost ();
770770
@@ -785,7 +785,7 @@ void CTxMemPool::check(const CCoinsViewCache& active_coins_tip, int64_t spendhei
785785 // Check children against mapNextTx
786786 CTxMemPoolEntry::Children setChildrenCheck;
787787 auto iter = mapNextTx.lower_bound (COutPoint (it->GetTx ().GetHash (), 0 ));
788- uint64_t child_sizes = 0 ;
788+ int64_t child_sizes{ 0 } ;
789789 for (; iter != mapNextTx.end () && iter->first ->hash == it->GetTx ().GetHash (); ++iter) {
790790 txiter childit = mapTx.find (iter->second ->GetHash ());
791791 assert (childit != mapTx.end ()); // mapNextTx points to in-mempool transactions
0 commit comments