mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 15:19:07 +01:00
5ded99a7f0fuzz: MockMempoolMinFee in wallet_fees (brunoerg)c9a7a198d9test: move MockMempoolMinFee to util/txmempool (brunoerg)adf67eb21bfuzz: create FeeEstimatorTestingSetup to set fee_estimator (brunoerg)ff10a37e99fuzz: mock CBlockPolicyEstimator in wallet_fuzz (brunoerg)f591c3becafees: make estimateSmartFee/HighestTargetTracked virtual for mocking (brunoerg)19273d0705fuzz: set mempool options in wallet_fees (brunoerg) Pull request description: Some functions in `wallet/fees.cpp` (fuzzed by the wallet_fees target) depends on some mempool stuff - e.g. relay current min fee, smart fee and max blocks estimation, relay dust fee and other ones. For better fuzzing of it, it would be great to have these values/interactions. That said, this PR enhances the `wallet_fees` target by: - Setting mempool options - `min_relay_feerate`, `dust_relay_feerate` and `incremental_relay_feerate` - when creating the `CTxMemPool`. - Creates a `ConsumeMempoolMinFee` function which is used to have a mempool min fee (similar approach from `MockMempoolMinFee` from unit test). - Mock `CBlockPolicyEstimator` - estimateSmartFee/HighestTagretTracket functions, especifically. It's better to mock it then trying to interact to CBlockPolicyEstimator in order to have some effective values due to performance. Note that I created `FeeEstimatorTestingSetup` because we cannot set `m_node.fee_estimator` in `ChainTestingSetup` sincefae8c73d9e. ACKs for top commit: maflcko: re-ACK5ded99a7f0🎯 ismaelsadeeq: Code review ACK5ded99a7f0Tree-SHA512: 13d2af042098afd237ef349437021ea841069d93d4c3e3a32e1b562c027d00c727f375426709d34421092993398caf7ba8ff19077982cb6f470f8938a44e7754