Revert "rpc: Reload CNode spans after reloading the log filter".

fixes #5863

The span reloading was causing a use-after-free bug at the point
the old span was exited.

This reverts commit b517be4334.
As a result, `setlogfilter` will not be able to change whether
the peer tracing span is enabled (or whether IP addresses are
logged) for existing peers. That can be fixed later (#5867).

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
Daira Hopwood 2022-04-12 13:25:50 +01:00
parent 327f61b5a8
commit 9aed2a9f11
1 changed files with 0 additions and 9 deletions

View File

@ -8,7 +8,6 @@
#include "fs.h"
#include "init.h"
#include "key_io.h"
#include "net.h"
#include "random.h"
#include "sync.h"
#include "ui_interface.h"
@ -274,14 +273,6 @@ UniValue setlogfilter(const UniValue& params, bool fHelp)
if (!tracing_reload(pTracingHandle, newFilter.c_str())) {
throw JSONRPCError(RPC_INTERNAL_ERROR, "Filter reload failed; check logs");
}
// Now that we have reloaded the filter, reload any stored spans.
{
LOCK(cs_vNodes);
for (CNode* pnode : vNodes) {
pnode->ReloadTracingSpan();
}
}
}
return NullUniValue;