aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/coinstats.h
diff options
context:
space:
mode:
authorCarl Dong <contact@carldong.me>2022-02-16 17:58:41 -0500
committerCarl Dong <contact@carldong.me>2022-05-23 14:53:35 -0400
commitf329a9298c06ffe74b9e9fbc07bfe6d282fef9cb (patch)
tree441ef3ea0f23e9da9b8092826c7d09a18edc6850 /src/kernel/coinstats.h
parent0e54456f0498e52131f8ae0c76b4dfe25f45b076 (diff)
downloadbitcoin-f329a9298c06ffe74b9e9fbc07bfe6d282fef9cb.tar.xz
scripted-diff: Move src/kernel/coinstats to kernel::
Introduces a new kernel:: namespace and move all of src/kernel/coinstats under it. In the verify script, lines like: line="$(grep -n 'namespace node {' -- src/kernel/coinstats.h | tail -n1 | cut -d: -f1)" sed -i -e "${line}s@namespace node {@namespace kernel {@" -- src/kernel/coinstats.h Are intended to replace only the last instance of "namespace node" with "namespace kernel", this is to avoid replacing forward declarations of things inside the node:: namespace. -BEGIN VERIFY SCRIPT- sed -E -i 's@namespace node@namespace kernel@g' -- src/kernel/coinstats.cpp line="$(grep -n 'namespace node {' -- src/kernel/coinstats.h | tail -n1 | cut -d: -f1)" sed -i -e "${line}s@namespace node {@namespace kernel {@" -- src/kernel/coinstats.h line="$(grep -n '// namespace node' -- src/kernel/coinstats.h | tail -n1 | cut -d: -f1)" sed -i -e "${line}s@// namespace node@// namespace kernel@" -- src/kernel/coinstats.h things='(CCoinsStats|CoinStatsHashType|GetBogoSize|TxOutSer|ComputeUTXOStats)' git grep -lE 'node::'"$things" | xargs sed -E -i 's@node::'"$things"'@kernel::\1@g' sed -E -i 's@'"$things"'@kernel::\1@g' -- src/node/coinstats.cpp src/node/coinstats.h sed -E -i 's@BlockManager@node::\0@g' -- src/kernel/coinstats.cpp -END VERIFY SCRIPT-
Diffstat (limited to 'src/kernel/coinstats.h')
-rw-r--r--src/kernel/coinstats.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/kernel/coinstats.h b/src/kernel/coinstats.h
index d470ea715a..a15957233f 100644
--- a/src/kernel/coinstats.h
+++ b/src/kernel/coinstats.h
@@ -19,7 +19,7 @@ namespace node {
class BlockManager;
} // namespace node
-namespace node {
+namespace kernel {
enum class CoinStatsHashType {
HASH_SERIALIZED,
MUHASH,
@@ -73,6 +73,6 @@ uint64_t GetBogoSize(const CScript& script_pub_key);
CDataStream TxOutSer(const COutPoint& outpoint, const Coin& coin);
std::optional<CCoinsStats> ComputeUTXOStats(CoinStatsHashType hash_type, CCoinsView* view, node::BlockManager& blockman, const std::function<void()>& interruption_point = {});
-} // namespace node
+} // namespace kernel
#endif // BITCOIN_KERNEL_COINSTATS_H