aboutsummaryrefslogtreecommitdiff
path: root/src/node/mempool_args.h
diff options
context:
space:
mode:
authorMacroFake <falke.marco@gmail.com>2022-08-02 15:30:00 +0200
committerMacroFake <falke.marco@gmail.com>2022-08-02 15:31:01 +0200
commitfac812ca835e0d843aba1d4db0e49d183018a29e (patch)
treeee5a6c99ad4f05318fe3cadfe6e1e27474343033 /src/node/mempool_args.h
parent66664384a6fec39ecb4d8d06db66a4f193a06e33 (diff)
downloadbitcoin-fac812ca835e0d843aba1d4db0e49d183018a29e.tar.xz
scripted-diff: Move mempool_args to src/node
It is part of the node library. Also, it won't be moved to the kernel lib, as it will be pruned of ArgsManager. -BEGIN VERIFY SCRIPT- # Move module git mv src/mempool_args.cpp src/node/ git mv src/mempool_args.h src/node/ # Replacements sed -i 's:mempool_args\.h:node/mempool_args.h:g' $(git grep -l mempool_args) sed -i 's:mempool_args\.cpp:node/mempool_args.cpp:g' $(git grep -l mempool_args) sed -i 's:MEMPOOL_ARGS_H:NODE_MEMPOOL_ARGS_H:g' $(git grep -l MEMPOOL_ARGS_H) -END VERIFY SCRIPT-
Diffstat (limited to 'src/node/mempool_args.h')
-rw-r--r--src/node/mempool_args.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/node/mempool_args.h b/src/node/mempool_args.h
new file mode 100644
index 0000000000..52d8b4f265
--- /dev/null
+++ b/src/node/mempool_args.h
@@ -0,0 +1,27 @@
+// Copyright (c) 2022 The Bitcoin Core developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef BITCOIN_NODE_MEMPOOL_ARGS_H
+#define BITCOIN_NODE_MEMPOOL_ARGS_H
+
+#include <optional>
+
+class ArgsManager;
+class CChainParams;
+struct bilingual_str;
+namespace kernel {
+struct MemPoolOptions;
+};
+
+/**
+ * Overlay the options set in \p argsman on top of corresponding members in \p mempool_opts.
+ * Returns an error if one was encountered.
+ *
+ * @param[in] argsman The ArgsManager in which to check set options.
+ * @param[in,out] mempool_opts The MemPoolOptions to modify according to \p argsman.
+ */
+[[nodiscard]] std::optional<bilingual_str> ApplyArgsManOptions(const ArgsManager& argsman, const CChainParams& chainparams, kernel::MemPoolOptions& mempool_opts);
+
+
+#endif // BITCOIN_NODE_MEMPOOL_ARGS_H