From aaced5633b81b2f08b993106a527e2a0e1d663c1 Mon Sep 17 00:00:00 2001 From: Ben Woosley Date: Mon, 6 Mar 2023 22:01:13 +0100 Subject: refactor: Move error() from util/system.h to logging.h error is a low-level function with a sole dependency on LogPrintf, which is defined in logging.h The background of this commit is an ongoing effort to decouple the libbitcoinkernel library from the ArgsManager defined in system.h. Moving the function out of system.h allows including it from a separate source file without including the ArgsManager definitions from system.h. --- src/addrdb.cpp | 1 + src/index/base.cpp | 1 + src/index/coinstatsindex.cpp | 1 + src/index/txindex.cpp | 1 + src/kernel/coinstats.cpp | 2 +- src/logging.h | 7 +++++++ src/net.cpp | 3 ++- src/netbase.cpp | 2 +- src/node/blockstorage.cpp | 1 + src/script/signingprovider.cpp | 2 +- src/txdb.cpp | 2 +- src/util/system.h | 7 ------- 12 files changed, 18 insertions(+), 12 deletions(-) diff --git a/src/addrdb.cpp b/src/addrdb.cpp index 7be13c8f1e..9ae8244d1c 100644 --- a/src/addrdb.cpp +++ b/src/addrdb.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/src/index/base.cpp b/src/index/base.cpp index 7c570d4534..8a311296c2 100644 --- a/src/index/base.cpp +++ b/src/index/base.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/src/index/coinstatsindex.cpp b/src/index/coinstatsindex.cpp index 8cece7d78d..4d637e217a 100644 --- a/src/index/coinstatsindex.cpp +++ b/src/index/coinstatsindex.cpp @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/src/index/txindex.cpp b/src/index/txindex.cpp index 25ccc3e636..9095e7afeb 100644 --- a/src/index/txindex.cpp +++ b/src/index/txindex.cpp @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/src/kernel/coinstats.cpp b/src/kernel/coinstats.cpp index 82d7d8c46b..4b75c387a6 100644 --- a/src/kernel/coinstats.cpp +++ b/src/kernel/coinstats.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include