forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmining_args.h
More file actions
37 lines (26 loc) · 1.17 KB
/
Copy pathmining_args.h
File metadata and controls
37 lines (26 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright (c) 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_MINING_ARGS_H
#define BITCOIN_NODE_MINING_ARGS_H
#include <node/mining_types.h>
#include <util/result.h>
class ArgsManager;
namespace node {
static const bool DEFAULT_PRINT_MODIFIED_FEE = false;
/**
* Read the mining options set in \p args. Returns an error if one was
* encountered.
*/
[[nodiscard]] util::Result<BlockCreateOptions> ReadMiningArgs(const ArgsManager& args);
/** Check option values for validity. Returns an error for invalid values. */
[[nodiscard]] util::Result<void> CheckMiningOptions(BlockCreateOptions options, bool use_argnames);
/** Replace null optional values with their hardcoded defaults. */
[[nodiscard]] BlockCreateOptions FlattenMiningOptions(BlockCreateOptions options);
/**
* Merge two BlockCreateOptions structs, replacing null values in \p x with
* non-null values from \p y.
*/
[[nodiscard]] BlockCreateOptions MergeMiningOptions(BlockCreateOptions x, const BlockCreateOptions& y);
} // namespace node
#endif // BITCOIN_NODE_MINING_ARGS_H