kernel: make blockTip index const

Notification interface subscribers need to view, but not mutate,
the index.
This commit is contained in:
stickies-v
2025-09-05 15:46:44 +01:00
parent 37c21ebe40
commit 75d9b72475
4 changed files with 4 additions and 4 deletions

View File

@@ -48,7 +48,7 @@ static void AlertNotify(const std::string& strMessage)
namespace node {
kernel::InterruptResult KernelNotifications::blockTip(SynchronizationState state, CBlockIndex& index, double verification_progress)
kernel::InterruptResult KernelNotifications::blockTip(SynchronizationState state, const CBlockIndex& index, double verification_progress)
{
{
LOCK(m_tip_block_mutex);

View File

@@ -35,7 +35,7 @@ public:
KernelNotifications(const std::function<bool()>& shutdown_request, std::atomic<int>& exit_status, node::Warnings& warnings)
: m_shutdown_request(shutdown_request), m_exit_status{exit_status}, m_warnings{warnings} {}
[[nodiscard]] kernel::InterruptResult blockTip(SynchronizationState state, CBlockIndex& index, double verification_progress) override EXCLUSIVE_LOCKS_REQUIRED(!m_tip_block_mutex);
[[nodiscard]] kernel::InterruptResult blockTip(SynchronizationState state, const CBlockIndex& index, double verification_progress) override EXCLUSIVE_LOCKS_REQUIRED(!m_tip_block_mutex);
void headerTip(SynchronizationState state, int64_t height, int64_t timestamp, bool presync) override;