HomePhabricator

kernel: Add warning method to notifications

Description

kernel: Add warning method to notifications

Summary:
This commit is part of the libbitcoinkernel project and seeks to remove
the ChainstateManager's and, more generally, the kernel library's
dependency on interface_ui with options methods in this and the following
few commits. By removing interface_ui from the kernel library, its
dependency on boost is reduced to just boost::multi_index.

The AlertNotify function is moved out of the validation.cpp file, which
removes its dependency on interface_ui as well as util/system

This is a partial backport of core#27636
https://github.com/bitcoin/bitcoin/pull/27636/commits/f871c69191dfe1331861ebcdbadb6bd47e45c8b1
Depends on D16206

Notes:

  • I removed the util/system include from validation in D16151, but it was actually needed for void runCommand(const std::string &strCommand). After this diff, we actually no longer need it in validation.cpp
  • we don't use AlertNotify for the same thing, so there are minor differences: we never backported core#10464, we don't use a bilingual_str, we don't call SetMiscWarning so we don't need warning.h in kernel_notification.cpp

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D16207

Details

Provenance
TheCharlatan <seb.kung@gmail.com>Authored on May 8 2023, 12:49
PiRKCommitted on May 23 2024, 19:11
PiRKPushed on May 23 2024, 19:11
Reviewer
Restricted Project
Differential Revision
D16207: kernel: Add warning method to notifications
Parents
rABCc2307765fd61: kernel: Add progress method to notifications
Branches
Unknown
Tags
Unknown