mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
Merge bitcoin/bitcoin#29086: refactor: Simply include CTxMemPool::Options in CTxMemPool directly rather than duplicating definition
cc67d33fdarefactor: Simply include CTxMemPool::Options in CTxMemPool directly rather than duplicating definition (Luke Dashjr) Pull request description: Instead of duplicating mempool options two places, just include the Options struct directly on the CTxMemPool ACKs for top commit: achow101: ACKcc67d33fdakristapsk: cr utACKcc67d33fdajonatack: ACKcc67d33fdaTree-SHA512: 9deb5ea6f85eeb1c7e04536cded65303b0ec459936a97e4f257aff2c50b0984a4ddbf69a4651f48455b9c80200a1fd24e9c74926874fdd9be436bbbe406251ce
This commit is contained in:
@@ -552,9 +552,9 @@ void TestChain100Setup::MockMempoolMinFee(const CFeeRate& target_feerate)
|
||||
assert(m_node.mempool->size() == 0);
|
||||
// The target feerate cannot be too low...
|
||||
// ...otherwise the transaction's feerate will need to be negative.
|
||||
assert(target_feerate > m_node.mempool->m_incremental_relay_feerate);
|
||||
assert(target_feerate > m_node.mempool->m_opts.incremental_relay_feerate);
|
||||
// ...otherwise this is not meaningful. The feerate policy uses the maximum of both feerates.
|
||||
assert(target_feerate > m_node.mempool->m_min_relay_feerate);
|
||||
assert(target_feerate > m_node.mempool->m_opts.min_relay_feerate);
|
||||
|
||||
// Manually create an invalid transaction. Manually set the fee in the CTxMemPoolEntry to
|
||||
// achieve the exact target feerate.
|
||||
@@ -565,7 +565,7 @@ void TestChain100Setup::MockMempoolMinFee(const CFeeRate& target_feerate)
|
||||
LockPoints lp;
|
||||
// The new mempool min feerate is equal to the removed package's feerate + incremental feerate.
|
||||
const auto tx_fee = target_feerate.GetFee(GetVirtualTransactionSize(*tx)) -
|
||||
m_node.mempool->m_incremental_relay_feerate.GetFee(GetVirtualTransactionSize(*tx));
|
||||
m_node.mempool->m_opts.incremental_relay_feerate.GetFee(GetVirtualTransactionSize(*tx));
|
||||
m_node.mempool->addUnchecked(CTxMemPoolEntry(tx, /*fee=*/tx_fee,
|
||||
/*time=*/0, /*entry_height=*/1, /*entry_sequence=*/0,
|
||||
/*spends_coinbase=*/true, /*sigops_cost=*/1, lp));
|
||||
|
||||
Reference in New Issue
Block a user