-
Notifications
You must be signed in to change notification settings - Fork 64
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
Daemon SonarCloud #269
Daemon SonarCloud #269
Conversation
* CRYPTONOTE_NAME has been changed to BLOCKCHAIN_DIR as the main reason this is used is to name the blockchain folder when the daemon is launched * CCX_RELEASE_VERSION + CCX_WALLET_RELEASE_VERSION additions to form a string saying "Conceal (or wallet) v" + version + (ID) * `print_genesis_tx_hex()` will now only print a random hash, the user who is using this command should know what to do with it, we're not here to teach * remove commented code * pretty daemon - remove timestamps and log level from client, keep them to the log file * removed `renameDataDir()` as I think this comes from the cryptonote era as as far as i know, conceal has never been called anything different * removed all previous calls of `std::cout` to respectively run whatever string through the logger * made use of 2 already implemented functions, `print_bci` and `print_bc_outs <file_name>` * made use of &args in every command by using it for usage checks * added debugging logging on commands (and functions in this file), maybe they'll prove useful *
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.
Everything seems fine. Thank you
still waiting for @AxVultis review btw, we will need to rebase this commit because in the meantime we had an urgent PR that needed to be merged ASAP |
* we use this function as a boolean, just in case in the future we ever do need to list all the block hashes. * updated daemon command to false on print blockchain indexs so it will print the id of the current height and not an array from 0 to current
I've updated the logic behind the For the purpose of this daemon command, it has been set to false as we don't want to overload the daemon with this one request. A fully synced chain would print over 900k+ of block ids. The logic has been changed to still be able to do that just in case it is ever needed in the future. I've also upstreamed this commit to include the recent work from the development branch. Should be good to go. |
I can't seem to figure a way for this command to print out only the information for a given height, I suggest we re-remove this command for now. This is a debug command to be fair and shouldn't really be needed by the user
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.
Great job
src/Daemon/Daemon.cpp
Outdated
@@ -43,12 +43,12 @@ namespace po = boost::program_options; | |||
|
|||
namespace | |||
{ | |||
const command_line::arg_descriptor<std::string> arg_config_file = {"config-file", "Specify configuration file", std::string(cn::CRYPTONOTE_NAME) + ".conf"}; | |||
const command_line::arg_descriptor<std::string> arg_config_file = {"config-file", "Specify configuration file", "Conceal.conf"}; |
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.
I think we should keep the default to conceal.conf
(with lower-case c)
src/Daemon/Daemon.cpp
Outdated
if (!config_path.has_parent_path()) | ||
config_path = data_dir_path / config_path; | ||
|
||
boost::system::error_code ec; | ||
if (boost::filesystem::exists(config_path, ec)) | ||
po::store(po::parse_config_file<char>(config_path.string<std::string>().c_str(), desc_cmd_sett), vm); |
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.
I would suggest keeping braces (here and everywhere) even for single lines.
src/Daemon/DaemonCommandsHandler.cpp
Outdated
|
||
uint16_t l = 0; | ||
if (!common::fromString(args[0], l)) | ||
{ | ||
std::cout << "wrong number format, use: set_log <log_level_number_0-4>" << ENDL; | ||
logger(logging::ERROR) << "Incorrect number format, use: set_log <log_level_number_0-4>"; |
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.
logger(logging::ERROR) << "Incorrect number format, use: set_log <log_level_number_0-4>"; | |
logger(logging::ERROR) << "Incorrect number format, use: set_log <0-4> (0-4 being log level)"; |
* taken from the review of this opened pr. * EDIT: Added BUILD_COMMIT_ID as a debugging log next to version. * if we want a user who is maybe having trouble to produce the exact version, then loading the daemon with the version flag will produce the ID without the need to change the log level within the daemon to find it out
Accidental double ops “<<“
What's the status of this PR? |
Just need to make sure |
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.
It's failing on build checks. I'm afraid this PR needs to be rebased with development branch again.
Upstreamed the forked development branch, ready for testing again |
Matches BLOCKCHAIN_DIR[] original state
|
Thanks for testing this @mainzerp! Your efforts are greatly appreciated with helping improve Conceals core software Side notes:
|
Thanks for the feedback |
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.
Everything seems alright on my side
Additions
"Conceal (or wallet) v" + version + (ID)
I.E"Conceal v6.6.1 (Ataegina)"
print_genesis_tx_hex()
will now only print a random hash, the user who is using this command should know what to do with it, we're not here to teachprint_bci
andprint_bc_outs <file_name>
&args
in every command by using it for usage checksRemovals
renameDataDir()
as I think this comes from the cryptonote era as as far as i know, conceal has never been called anything differentstd::cout
to respectively run whatever string through the loggerWays to Test
Conceal v6.6.1 (Ataegina)
.print_bci
andprint_bc_outs <file_name>
do?print_bci
should print out the current blockchain height.print_bc_outs
should print out the outputs in the current block.conceald.log
folder?concealwallet
works.