aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/test/system_tests.cpp2
-rw-r--r--src/validation.cpp3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/test/system_tests.cpp b/src/test/system_tests.cpp
index 07d15f5552..c9dd9c82cd 100644
--- a/src/test/system_tests.cpp
+++ b/src/test/system_tests.cpp
@@ -54,7 +54,7 @@ BOOST_AUTO_TEST_CASE(run_command)
}
{
// Return non-zero exit code, with error message for stderr
- const std::string command{"python3 -c 'import sys; print(\"err\", file=sys.stderr); sys.exit(2)'"};
+ const std::string command{"sh -c 'echo err 1>&2 && false'"};
const std::string expected{"err"};
BOOST_CHECK_EXCEPTION(RunCommandParseJSON(command), std::runtime_error, [&](const std::runtime_error& e) {
const std::string what(e.what());
diff --git a/src/validation.cpp b/src/validation.cpp
index a6b7f3d361..59beb5cbda 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -2023,7 +2023,8 @@ void Chainstate::CheckForkWarningConditions()
// Before we get past initial download, we cannot reliably alert about forks
// (we assume we don't get stuck on a fork before finishing our initial sync)
- if (m_chainman.IsInitialBlockDownload()) {
+ // Also not applicable to the background chainstate
+ if (m_chainman.IsInitialBlockDownload() || this->GetRole() == ChainstateRole::BACKGROUND) {
return;
}