Skip to content

Commit e0df41d

Browse files
committed
[validation] default conflicting fees and size to 0
This should have no effect in practice, since we only ever call PreChecks once per transaction.
1 parent b001b9f commit e0df41d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/validation.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -475,8 +475,10 @@ class MemPoolAccept
475475
bool m_replacement_transaction;
476476
CAmount m_base_fees;
477477
CAmount m_modified_fees;
478-
CAmount m_conflicting_fees;
479-
size_t m_conflicting_size;
478+
/** Total modified fees of all transactions being replaced. */
479+
CAmount m_conflicting_fees{0};
480+
/** Total virtual size of all transactions being replaced. */
481+
size_t m_conflicting_size{0};
480482

481483
const CTransactionRef& m_ptx;
482484
const uint256& m_hash;
@@ -799,8 +801,6 @@ bool MemPoolAccept::PreChecks(ATMPArgs& args, Workspace& ws)
799801

800802
// Check if it's economically rational to mine this transaction rather
801803
// than the ones it replaces.
802-
nConflictingFees = 0;
803-
nConflictingSize = 0;
804804
uint64_t nConflictingCount = 0;
805805

806806
// If we don't hold the lock allConflicting might be incomplete; the

0 commit comments

Comments
 (0)