From dee984def69b972db386ff6806f09acbb502d9bd Mon Sep 17 00:00:00 2001 From: TheCharlatan Date: Tue, 28 May 2024 20:58:48 +0200 Subject: [PATCH] kernel: Add chainstate manager object to C header This is the main driver class for anything validation related, so expose it here. Creating the chainstate manager options will currently also trigger the creation of their respectively configured directories. The chainstate manager and block manager options are consolidated into a single object. The kernel might eventually introduce a separate block manager object for the purposes of being a light-weight block store reader. The chainstate manager will associate with the context with which it was created for the duration of its lifetime. It is only valid if that context remains in memory too. The tests now also create dedicated temporary directories. This is similar to the behaviour in the existing unit test framework. Co-authored-by: stickies-v --- src/kernel/bitcoinkernel.cpp | 87 ++++++++++++++++++++++++++++++ src/kernel/bitcoinkernel.h | 72 +++++++++++++++++++++++++ src/kernel/bitcoinkernel_wrapper.h | 23 ++++++++ src/test/kernel/test_kernel.cpp | 77 ++++++++++++++++++++++++++ test/lint/test_runner/src/main.rs | 1 + 5 files changed, 260 insertions(+) diff --git a/src/kernel/bitcoinkernel.cpp b/src/kernel/bitcoinkernel.cpp index 1a136496b3d..88fc9fbab04 100644 --- a/src/kernel/bitcoinkernel.cpp +++ b/src/kernel/bitcoinkernel.cpp @@ -7,6 +7,7 @@ #include #include +#include #include #include #include @@ -14,6 +15,7 @@ #include #include #include +#include #include #include