-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Fix compatibility with -debuglogfile command-line option
#33215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code Coverage & BenchmarksFor details see: https://corecheck.dev/bitcoin/bitcoin/pulls/33215. ReviewsSee the guideline for information on the review process. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
| }, | ||
| RPCResult{ | ||
| RPCResult::Type::BOOL, "", "Verification finished successfully. If false, check debug.log for reason."}, | ||
| RPCResult::Type::BOOL, "", strprintf("Verification finished successfully. If false, check %s for reason.", fs::PathToString(LogInstance().m_file_path))}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| RPCResult::Type::BOOL, "", strprintf("Verification finished successfully. If false, check %s for reason.", fs::PathToString(LogInstance().m_file_path))}, | |
| RPCResult::Type::BOOL, "", "Verification finished successfully. If false, check debug log for reason."}, |
I don't think it makes sense to include the real filename in RPC results.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this is the RPC doc, not the RPC result. No opinion about the result, but it must not be in the doc. Otherwise, the doc is confusing, brittle and highly mutable.
|
|
||
| if (!node::LoadMempool(mempool, load_path, chainstate, std::move(opts))) { | ||
| throw JSONRPCError(RPC_MISC_ERROR, "Unable to import mempool file, see debug.log for details."); | ||
| throw JSONRPCError(RPC_MISC_ERROR, strprintf("Unable to import mempool file, see %s for details.", fs::PathToString(LogInstance().m_file_path))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| throw JSONRPCError(RPC_MISC_ERROR, strprintf("Unable to import mempool file, see %s for details.", fs::PathToString(LogInstance().m_file_path))); | |
| throw JSONRPCError(RPC_MISC_ERROR, "Unable to import mempool file, see debug log for details."); |
This change avoids hardcoding the "debug.log" filename, ensuring compatibility with custom filenames provided via the `-debuglogfile` command-line option. Github-Pull: bitcoin#33215 Rebased-From: af1b42b
This change avoids hardcoding the "debug.log" filename, ensuring compatibility with custom filenames provided via the `-debuglogfile` command-line option.
af1b42b to
0ca7ce7
Compare
This PR avoids hardcoding the "debug.log" filename, ensuring compatibility with custom filenames provided via the
-debuglogfilecommand-line option.