private broadcast: remove no-op [[nodiscard]]
What changed, and why it matters
This is a trivial code-cleanup commit. It removes a duplicate [[nodiscard]] marker from a function definition in a source file, because the same marker is already present on the function's declaration in the header file. The duplicate had no effect on program behavior or security.
No action required. This is a non-security, cosmetic cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit removes [[nodiscard]] from the definition of PrivateBroadcast::Add() in src/private_broadcast.cpp. The header declaration already carries [[nodiscard]], so the attribute on the definition was redundant and ignored by the compiler. There is no functional change.
Changed components
src/private_broadcast.cppInspect captured patch +1 / −1
diff --git a/src/private_broadcast.cpp b/src/private_broadcast.cpp
index c7df778f..b4d61a65 100644
--- a/src/private_broadcast.cpp
+++ b/src/private_broadcast.cpp
@@ -9,7 +9,7 @@
#include <algorithm>
-[[nodiscard]] PrivateBroadcast::AddResult PrivateBroadcast::Add(const CTransactionRef& tx)
+PrivateBroadcast::AddResult PrivateBroadcast::Add(const CTransactionRef& tx)
EXCLUSIVE_LOCKS_REQUIRED(!m_mutex)
{
LOCK(m_mutex);
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.