@@ -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 += descendant.GetTxSize ();
153+ modifySize += int64_t ( 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 (updateIt->GetTxSize (), updateIt->GetModifiedFee (), 1 , updateIt->GetSigOpCost ()) );
158+ mapTx.modify (mapTx.iterator_to (descendant), update_ancestor_state{ int64_t (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 * it->GetTxSize ();
345+ const int64_t updateSize{ updateCount * int64_t ( 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 += ancestorIt->GetTxSize ();
359+ updateSize += int64_t ( ancestorIt->GetTxSize () );
360360 updateFee += ancestorIt->GetModifiedFee ();
361361 updateSigOpsCost += ancestorIt->GetSigOpCost ();
362362 }
@@ -433,19 +433,19 @@ void CTxMemPool::UpdateForRemoveFromMempool(const setEntries &entriesToRemove, b
433433
434434void CTxMemPoolEntry::UpdateDescendantState (int64_t modifySize, CAmount modifyFee, int64_t modifyCount)
435435{
436- nSizeWithDescendants += modifySize;
436+ nSizeWithDescendants += uint64_t ( modifySize) ;
437437 assert (int64_t (nSizeWithDescendants) > 0 );
438438 nModFeesWithDescendants += modifyFee;
439- nCountWithDescendants += modifyCount;
439+ 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 += modifySize;
445+ nSizeWithAncestors += uint64_t ( modifySize) ;
446446 assert (int64_t (nSizeWithAncestors) > 0 );
447447 nModFeesWithAncestors += modifyFee;
448- nCountWithAncestors += modifyCount;
448+ nCountWithAncestors += uint64_t ( modifyCount) ;
449449 assert (int64_t (nCountWithAncestors) > 0 );
450450 nSigOpCostWithAncestors += modifySigOps;
451451 assert (int (nSigOpCostWithAncestors) >= 0 );
0 commit comments