rpc: Reload CNode spans after reloading the log filter
Closes zcash/zcash#4908.
This commit is contained in:
parent
42c38b00c1
commit
b517be4334
|
@ -8,6 +8,7 @@
|
|||
#include "fs.h"
|
||||
#include "init.h"
|
||||
#include "key_io.h"
|
||||
#include "net.h"
|
||||
#include "random.h"
|
||||
#include "sync.h"
|
||||
#include "ui_interface.h"
|
||||
|
@ -271,6 +272,14 @@ 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;
|
||||
|
|
Loading…
Reference in New Issue