MCPcopy Create free account
hub / github.com/ElementsProject/elements / GetWarnings

Function GetWarnings

src/warnings.cpp:31–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29}
30
31bilingual_str GetWarnings(bool verbose)
32{
33 bilingual_str warnings_concise;
34 std::vector<bilingual_str> warnings_verbose;
35
36 LOCK(g_warnings_mutex);
37
38 // Pre-release build warning
39 if (!CLIENT_VERSION_IS_RELEASE) {
40 warnings_concise = _("This is a pre-release test build - use at your own risk - do not use for mining or merchant applications");
41 warnings_verbose.emplace_back(warnings_concise);
42 }
43
44 // Misc warnings like out of disk space and clock is wrong
45 if (!g_misc_warnings.empty()) {
46 warnings_concise = g_misc_warnings;
47 warnings_verbose.emplace_back(warnings_concise);
48 }
49
50 if (fLargeWorkInvalidChainFound) {
51 warnings_concise = _("Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.");
52 warnings_verbose.emplace_back(warnings_concise);
53 }
54
55 if (verbose) {
56 return Join(warnings_verbose, Untranslated("<hr />"));
57 }
58
59 return warnings_concise;
60}

Callers 5

BOOST_AUTO_TEST_CASEFunction · 0.85
getmininginfoFunction · 0.85
getblockchaininfoFunction · 0.85
getnetworkinfoFunction · 0.85
getWarningsMethod · 0.85

Calls 5

_Function · 0.85
JoinFunction · 0.85
UntranslatedFunction · 0.85
emplace_backMethod · 0.80
emptyMethod · 0.45

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.68