From e3e6ce82188a39cb51b96c5f3989fc50c3087ce0 Mon Sep 17 00:00:00 2001 From: Dimitrios Siganos Date: Mon, 7 Feb 2022 14:45:57 +0000 Subject: [PATCH] Minor bugfix for election scheduler thread name (#3713) The bug was introduced by commit: 8b428729777e06a1786ce1c9f5bb818352eadfb0: "Create nano::unchecked_map ADT which is ..." Missing break which caused the election scheduler thread name to be wrong. The bug was found by @fikumikudev, many thanks! --- nano/lib/threading.cpp | 4 ++++ nano/lib/threading.hpp | 1 + 2 files changed, 5 insertions(+) diff --git a/nano/lib/threading.cpp b/nano/lib/threading.cpp index b0b70576..3b71fd9a 100644 --- a/nano/lib/threading.cpp +++ b/nano/lib/threading.cpp @@ -86,8 +86,12 @@ std::string nano::thread_role::get_string (nano::thread_role::name role) break; case nano::thread_role::name::election_scheduler: thread_role_name_string = "Election Sched"; + break; case nano::thread_role::name::unchecked: thread_role_name_string = "Unchecked"; + break; + default: + debug_assert (false && "nano::thread_role::get_string unhandled thread role"); } /* diff --git a/nano/lib/threading.hpp b/nano/lib/threading.hpp index 142bf627..aab4771b 100644 --- a/nano/lib/threading.hpp +++ b/nano/lib/threading.hpp @@ -43,6 +43,7 @@ namespace thread_role election_scheduler, unchecked, }; + /* * Get/Set the identifier for the current thread */