From fa02591edff0255c5120b5acb2366542a61c251f Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Wed, 25 Jan 2023 09:33:34 +0100 Subject: [PATCH 1/2] doc: Export threadsafety.h from sync.h All places that include sync.h will likely need threadsafety annotations, so export them. --- src/sync.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sync.h b/src/sync.h index 8ce2e7b1245..7242a793abe 100644 --- a/src/sync.h +++ b/src/sync.h @@ -11,7 +11,7 @@ #include #endif -#include +#include // IWYU pragma: export #include #include From faba08b5b4dd5dedb457db18696de6e15839c696 Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Wed, 25 Jan 2023 09:46:28 +0100 Subject: [PATCH 2/2] refactor: Remove stray cs_main redundant declaration --- ci/test/06_script_b.sh | 1 + src/node/utxo_snapshot.cpp | 5 +++++ src/node/utxo_snapshot.h | 9 ++++++--- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ci/test/06_script_b.sh b/ci/test/06_script_b.sh index f792a9f192a..f94af0cd79f 100755 --- a/ci/test/06_script_b.sh +++ b/ci/test/06_script_b.sh @@ -48,6 +48,7 @@ if [ "${RUN_TIDY}" = "true" ]; then " src/node/chainstate.cpp"\ " src/node/chainstatemanager_args.cpp"\ " src/node/mempool_args.cpp"\ + " src/node/utxo_snapshot.cpp"\ " src/node/validation_cache_args.cpp"\ " src/policy/feerate.cpp"\ " src/policy/packages.cpp"\ diff --git a/src/node/utxo_snapshot.cpp b/src/node/utxo_snapshot.cpp index bab1b752116..cccf95e5529 100644 --- a/src/node/utxo_snapshot.cpp +++ b/src/node/utxo_snapshot.cpp @@ -7,12 +7,17 @@ #include #include #include +#include +#include +#include #include #include #include +#include #include #include +#include namespace node { diff --git a/src/node/utxo_snapshot.h b/src/node/utxo_snapshot.h index b5ed9ef9fe0..c5c018c9e85 100644 --- a/src/node/utxo_snapshot.h +++ b/src/node/utxo_snapshot.h @@ -7,13 +7,16 @@ #define BITCOIN_NODE_UTXO_SNAPSHOT_H #include -#include +#include #include -#include +#include +#include +#include #include +#include -extern RecursiveMutex cs_main; +class Chainstate; namespace node { //! Metadata describing a serialized version of a UTXO set from which an