mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-09-13 06:04:42 +02:00
Both are fine and this refactor shouldn't change any behavior.
However, inline constexpr will ensure each symbol has a single address
across all TU, making the release binary smaller.
Review note: In theory the script may also cover functions, but they
were handled in the prior commit, to remove the redundant inline for
them.
-BEGIN VERIFY SCRIPT-
sed --regexp-extended -i 's/^(static constexpr|constexpr static)\>/inline constexpr/g' $( \
git grep --extended-regexp -l '^(static constexpr|constexpr static)' -- \
'*.h' \
':(exclude)src/crc32c' \
':(exclude)src/ipc/libmultiprocess' \
':(exclude)src/minisketch' \
)
-END VERIFY SCRIPT-
26 lines
732 B
C++
26 lines
732 B
C++
// Copyright (c) 2022-present 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_PERSIST_ARGS_H
|
|
#define BITCOIN_NODE_MEMPOOL_PERSIST_ARGS_H
|
|
|
|
#include <util/fs.h>
|
|
|
|
class ArgsManager;
|
|
|
|
namespace node {
|
|
|
|
/**
|
|
* Default for -persistmempool, indicating whether the node should attempt to
|
|
* automatically load the mempool on start and save to disk on shutdown
|
|
*/
|
|
inline constexpr bool DEFAULT_PERSIST_MEMPOOL{true};
|
|
|
|
bool ShouldPersistMempool(const ArgsManager& argsman);
|
|
fs::path MempoolPath(const ArgsManager& argsman);
|
|
|
|
} // namespace node
|
|
|
|
#endif // BITCOIN_NODE_MEMPOOL_PERSIST_ARGS_H
|