mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-27 23:39:46 +02:00
[refactor] Cleanup BlockAssembler mempool usage
The `addPackageTxs` method of the `BlockAssembler` currently has access to two mempool variables, as an argument and as a member. Clean this up and clarify that they both are the same mempool instance by removing the argument and instead only using the member variable in the method. Co-Authored-By: Anthony Towns <aj@erisian.com.au> Co-authored-by: stickies-v <stickies-v@protonmail.com>
This commit is contained in:
@@ -187,8 +187,11 @@ private:
|
||||
// Methods for how to add transactions to a block.
|
||||
/** Add transactions based on feerate including unconfirmed ancestors
|
||||
* Increments nPackagesSelected / nDescendantsUpdated with corresponding
|
||||
* statistics from the package selection (for logging statistics). */
|
||||
void addPackageTxs(const CTxMemPool& mempool, int& nPackagesSelected, int& nDescendantsUpdated) EXCLUSIVE_LOCKS_REQUIRED(mempool.cs);
|
||||
* statistics from the package selection (for logging statistics).
|
||||
*
|
||||
* @pre BlockAssembler::m_mempool must not be nullptr
|
||||
*/
|
||||
void addPackageTxs(int& nPackagesSelected, int& nDescendantsUpdated) EXCLUSIVE_LOCKS_REQUIRED(!m_mempool->cs);
|
||||
|
||||
// helper functions for addPackageTxs()
|
||||
/** Remove confirmed (inBlock) entries from given set */
|
||||
|
||||
Reference in New Issue
Block a user