diff options
author | glozow <gloriajzhao@gmail.com> | 2021-08-20 15:17:49 +0100 |
---|---|---|
committer | glozow <gloriajzhao@gmail.com> | 2021-08-24 15:47:21 +0100 |
commit | e0df41d7d584b854c2914d4afe7b21e0af3fbf69 (patch) | |
tree | 899bf45ad86d96013ae6c4e97fcb3b97ecd9e5be /src/validation.cpp | |
parent | b001b9f6de7a039a468cf0f9645f3f0a430fa889 (diff) | |
download | bitcoin-e0df41d7d584b854c2914d4afe7b21e0af3fbf69.tar.xz |
[validation] default conflicting fees and size to 0
This should have no effect in practice, since we only ever call
PreChecks once per transaction.
Diffstat (limited to 'src/validation.cpp')
-rw-r--r-- | src/validation.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/validation.cpp b/src/validation.cpp index 29f82c2de0..cc24c79e13 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -475,8 +475,10 @@ private: bool m_replacement_transaction; CAmount m_base_fees; CAmount m_modified_fees; - CAmount m_conflicting_fees; - size_t m_conflicting_size; + /** Total modified fees of all transactions being replaced. */ + CAmount m_conflicting_fees{0}; + /** Total virtual size of all transactions being replaced. */ + size_t m_conflicting_size{0}; const CTransactionRef& m_ptx; const uint256& m_hash; @@ -799,8 +801,6 @@ bool MemPoolAccept::PreChecks(ATMPArgs& args, Workspace& ws) // Check if it's economically rational to mine this transaction rather // than the ones it replaces. - nConflictingFees = 0; - nConflictingSize = 0; uint64_t nConflictingCount = 0; // If we don't hold the lock allConflicting might be incomplete; the |