mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 22:18:54 +01:00
kernel: Remove StartShutdown calls from validation code
This change drops the last kernel dependency on shutdown.cpp. It also adds new hooks for libbitcoinkernel applications to be able to interrupt kernel operations when the chain tip changes. This is a refactoring that does not affect behavior. (Looking at the code it can appear like the new break statement in the ActivateBestChain function is a change in behavior, but actually the previous StartShutdown call was indirectly triggering a break before, because it was causing m_chainman.m_interrupt to be true. The new code just makes the break more obvious.)
This commit is contained in:
@@ -23,7 +23,6 @@
|
||||
#include <policy/packages.h>
|
||||
#include <policy/policy.h>
|
||||
#include <script/script_error.h>
|
||||
#include <shutdown.h>
|
||||
#include <sync.h>
|
||||
#include <txdb.h>
|
||||
#include <txmempool.h> // For CTxMemPool::cs
|
||||
@@ -970,7 +969,6 @@ public:
|
||||
const arith_uint256& MinimumChainWork() const { return *Assert(m_options.minimum_chain_work); }
|
||||
const uint256& AssumedValidBlock() const { return *Assert(m_options.assumed_valid_block); }
|
||||
kernel::Notifications& GetNotifications() const { return m_options.notifications; };
|
||||
int StopAtHeight() const { return m_options.stop_at_height; };
|
||||
|
||||
/**
|
||||
* Alias for ::cs_main.
|
||||
|
||||
Reference in New Issue
Block a user