[#node-MiniMiner] = xref:node.adoc[node]::MiniMiner :relfileprefix: ../ :mrdocs: A minimal version of BlockAssembler, using the same ancestor set scoring algorithm. Allows us to run this algorithm on a limited set of transactions (e.g. subset of mempool or transactions that are not yet in mempool) instead of the entire mempool, ignoring consensus rules. Callers may use this to: ‐ Calculate the "bump fee" needed to spend an unconfirmed UTXO at a given feerate ‐ "Linearize" a list of transactions to see the order in which they would be selected for inclusion in a block == Synopsis Declared in `<node/mini_miner.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class MiniMiner; ---- == Member Functions [cols="1,4"] |=== | Name| Description | xref:node/MiniMiner/2constructor-0b.adoc[`MiniMiner`] [.small]#[constructor]# | Constructors | xref:node/MiniMiner/BuildMockTemplate.adoc[`BuildMockTemplate`] | Build a block template until the target feerate is hit. If target_feerate is not given, builds a block template until all transactions have been selected. | xref:node/MiniMiner/CalculateBumpFees.adoc[`CalculateBumpFees`] | Construct a new block template and, for each outpoint corresponding to a transaction that did not make it into the block, calculate the cost of bumping those transactions (and their ancestors) to the minimum feerate. Returns a map from outpoint to bump fee, or an empty map if they cannot be calculated. | xref:node/MiniMiner/CalculateTotalBumpFees.adoc[`CalculateTotalBumpFees`] | Construct a new block template and, calculate the cost of bumping all transactions that did not make it into the block to the target feerate. Returns the total bump fee, or std::nullopt if it cannot be calculated. | xref:node/MiniMiner/GetMockTemplateTxids.adoc[`GetMockTemplateTxids`] | Returns set of txids in the block template if one has been constructed. | xref:node/MiniMiner/IsReadyToCalculate.adoc[`IsReadyToCalculate`] | Returns true if CalculateBumpFees may be called, false if not. | xref:node/MiniMiner/Linearize.adoc[`Linearize`] | Construct a new block template with all of the transactions and calculate the order in which they are selected. Returns the sequence number (lower = selected earlier) with which each transaction was selected, indexed by txid, or an empty map if it cannot be calculated. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#