aboutsummaryrefslogtreecommitdiff
path: root/src/logging.cpp
diff options
context:
space:
mode:
authorSuhas Daftuar <sdaftuar@gmail.com>2022-02-09 09:38:52 -0500
committerSuhas Daftuar <sdaftuar@gmail.com>2022-08-29 08:10:35 -0400
commit551a8d957c4c44afbd0d608fcdf7c6a4352babce (patch)
tree774014202e3ad8560a3be4d59f94b8443e672a67 /src/logging.cpp
parented470940cddbeb40425960d51cefeec4948febe4 (diff)
Utilize anti-DoS headers download strategy
Avoid permanently storing headers from a peer, unless the headers are part of a chain with sufficiently high work. This prevents memory attacks using low-work headers. Designed and co-authored with Pieter Wuille.
Diffstat (limited to 'src/logging.cpp')
-rw-r--r--src/logging.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/logging.cpp b/src/logging.cpp
index 73c4e458bd..92fc31917f 100644
--- a/src/logging.cpp
+++ b/src/logging.cpp
@@ -165,6 +165,7 @@ const CLogCategoryDesc LogCategories[] =
#endif
{BCLog::UTIL, "util"},
{BCLog::BLOCKSTORE, "blockstorage"},
+ {BCLog::HEADERSSYNC, "headerssync"},
{BCLog::ALL, "1"},
{BCLog::ALL, "all"},
};
@@ -263,6 +264,8 @@ std::string LogCategoryToStr(BCLog::LogFlags category)
return "util";
case BCLog::LogFlags::BLOCKSTORE:
return "blockstorage";
+ case BCLog::LogFlags::HEADERSSYNC:
+ return "headerssync";
case BCLog::LogFlags::ALL:
return "all";
}