๐ Major
Track the active success union member (src/util/result.h:161, head)
SuccessHolder() leaves m_success inactive, but the destructor suppresses destruction only when !*this. During Result construction, the result reports success before its payload is constructed. If construction throws, such as while allocating a std::string or fs::path payload, unwinding calls the destructor, which destroys an inactive union member. This is undefined behavior. Track the union member's lifetime independently and preserve a destructible state across throwing transitions. Add a regression test with a throwing payload.
๐ก Minor
Log the verification error on failure (src/kernel/bitcoinkernel.cpp:1111, head)
This branch checks verify_result but formats load_result, which has already succeeded. When verification fails with an error, such as for a future-dated tip, a corrupted block database, or insufficient verification dbcache, the kernel API logs an empty or unrelated diagnostic before returning nullptr. Format util::ErrorString(verify_result) instead.
๐ก Suggestion
Avoid copying message vectors when joining (src/util/messages.cpp:14, head)
{messages.errors, messages.warnings} copies both vectors and their strings on every JoinMessages call. Iterate over the vectors by reference, or use a shared append helper, to preserve error-before-warning ordering and the same output without copying.