7 #if defined(HAVE_CONFIG_H)
33 std::string strCmd =
gArgs.
GetArg(
"-alertnotify",
"");
34 if (strCmd.empty())
return;
39 std::string singleQuote(
"'");
41 safeStatus = singleQuote+safeStatus+singleQuote;
44 std::thread
t(runCommand, strCmd);
51 static bool fWarned =
false;
73 uiInterface.NotifyHeaderTip(state, height, timestamp, presync);
int64_t GetIntArg(const std::string &strArg, int64_t nDefault) const
Return integer argument or default value.
std::string GetArg(const std::string &strArg, const std::string &strDefault) const
Return string argument or default value.
The block chain is a tree shaped structure starting with the genesis block at the root,...
int nHeight
height of the entry in the chain. The genesis block has height 0
int m_stop_at_height
Block height after which blockTip notification will return Interrupted{}, if >0.
void headerTip(SynchronizationState state, int64_t height, int64_t timestamp, bool presync) override
std::atomic< int > & m_exit_status
void progress(const bilingual_str &title, int progress_percent, bool resume_possible) override
void flushError(const std::string &debug_message) override
The flush error notification is sent to notify the user that an error occurred while flushing block d...
void warning(const bilingual_str &warning) override
void fatalError(const std::string &debug_message, const bilingual_str &user_message={}) override
The fatal error notification is sent to notify the user when an error occurs in kernel code that can'...
kernel::InterruptResult blockTip(SynchronizationState state, CBlockIndex &index) override
bool m_shutdown_on_fatal_error
Useful for tests, can be set to false to avoid shutdown on fatal error.
CClientUIInterface uiInterface
static void AlertNotify(const std::string &strMessage)
static void DoWarning(const bilingual_str &warning)
std::variant< std::monostate, Interrupted > InterruptResult
Simple result type for functions that need to propagate an interrupt status and don't have other retu...
void ReadNotificationArgs(const ArgsManager &args, KernelNotifications ¬ifications)
void AbortNode(std::atomic< int > &exit_status, const std::string &debug_message, const bilingual_str &user_message, bool shutdown)
void StartShutdown()
Request shutdown of the application.
Result type for use with std::variant to indicate that an operation should be interrupted.
std::string SanitizeString(std::string_view str, int rule)
Remove unsafe chars.
void ReplaceAll(std::string &in_out, const std::string &search, const std::string &substitute)
SynchronizationState
Current sync state passed to tip changed callbacks.
void SetMiscWarning(const bilingual_str &warning)