mempool_args.h raw
1 // Copyright (c) 2022 The Limenka developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5 #ifndef LIMENKA_NODE_MEMPOOL_ARGS_H
6 #define LIMENKA_NODE_MEMPOOL_ARGS_H
7
8 #include <common/settings.h>
9 #include <util/result.h>
10
11 #include <cstdint>
12 #include <string_view>
13 #include <utility>
14
15 class ArgsManager;
16 class CChainParams;
17 struct bilingual_str;
18 namespace kernel {
19 struct MemPoolOptions;
20 };
21
22 [[nodiscard]] util::Result<std::pair<int32_t, int>> ParseDustDynamicOpt(std::string_view optstr, unsigned int max_fee_estimate_blocks);
23 void ApplyPermitEphemeralOption(const common::SettingsValue& value, kernel::MemPoolOptions& mempool_opts);
24
25 /**
26 * Overlay the options set in \p argsman on top of corresponding members in \p mempool_opts.
27 * Returns an error if one was encountered.
28 *
29 * @param[in] argsman The ArgsManager in which to check set options.
30 * @param[in,out] mempool_opts The MemPoolOptions to modify according to \p argsman.
31 */
32 [[nodiscard]] util::Result<void> ApplyArgsManOptions(const ArgsManager& argsman, const CChainParams& chainparams, kernel::MemPoolOptions& mempool_opts);
33
34 /** Apply flag-day overrides to mempool options based on chain tip MTP.
35 * After TAPROOT_REJECT_MTP (fork activation, 2026-10-18), reject_taproot
36 * defaults to true.
37 * Node operators can override with -rejecttaproot=0.
38 */
39 void ApplyMempoolFlagDay(int64_t tip_mtp, kernel::MemPoolOptions& mempool_opts, const ArgsManager& argsman);
40
41
42 #endif // LIMENKA_NODE_MEMPOOL_ARGS_H
43