Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

nodeos & keosd version reporting #8062

Merged
merged 4 commits into from
Oct 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libraries/appbase
3 changes: 2 additions & 1 deletion plugins/chain_plugin/chain_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1430,7 +1430,8 @@ read_only::get_info_results read_only::get_info(const read_only::get_info_params
//__builtin_popcountll(db.get_dynamic_global_properties().recent_slots_filled) / 64.0,
app().version_string(),
db.fork_db_pending_head_block_num(),
db.fork_db_pending_head_block_id()
db.fork_db_pending_head_block_id(),
app().full_version_string()
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ class read_only {
optional<string> server_version_string;
optional<uint32_t> fork_db_head_block_num;
optional<chain::block_id_type> fork_db_head_block_id;
optional<string> server_full_version_string;
};
get_info_results get_info(const get_info_params&) const;

Expand Down Expand Up @@ -749,7 +750,10 @@ class chain_plugin : public plugin<chain_plugin> {
FC_REFLECT( eosio::chain_apis::permission, (perm_name)(parent)(required_auth) )
FC_REFLECT(eosio::chain_apis::empty, )
FC_REFLECT(eosio::chain_apis::read_only::get_info_results,
(server_version)(chain_id)(head_block_num)(last_irreversible_block_num)(last_irreversible_block_id)(head_block_id)(head_block_time)(head_block_producer)(virtual_block_cpu_limit)(virtual_block_net_limit)(block_cpu_limit)(block_net_limit)(server_version_string)(fork_db_head_block_num)(fork_db_head_block_id) )
(server_version)(chain_id)(head_block_num)(last_irreversible_block_num)(last_irreversible_block_id)
(head_block_id)(head_block_time)(head_block_producer)
(virtual_block_cpu_limit)(virtual_block_net_limit)(block_cpu_limit)(block_net_limit)
(server_version_string)(fork_db_head_block_num)(fork_db_head_block_id)(server_full_version_string) )
FC_REFLECT(eosio::chain_apis::read_only::get_activated_protocol_features_params, (lower_bound)(upper_bound)(limit)(search_by_block_num)(reverse) )
FC_REFLECT(eosio::chain_apis::read_only::get_activated_protocol_features_results, (activated_protocol_features)(more) )
FC_REFLECT(eosio::chain_apis::read_only::get_block_params, (block_num_or_id))
Expand Down
2 changes: 1 addition & 1 deletion programs/keosd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ endif()
configure_file(config.hpp.in config.hpp ESCAPE_QUOTES)

target_link_libraries( ${KEY_STORE_EXECUTABLE_NAME}
PRIVATE appbase
PRIVATE appbase version
PRIVATE wallet_api_plugin wallet_plugin
PRIVATE http_plugin
PRIVATE eosio_chain fc ${CMAKE_DL_LIBS} ${PLATFORM_SPECIFIC_LIBS} )
Expand Down
3 changes: 3 additions & 0 deletions programs/keosd/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <eosio/http_plugin/http_plugin.hpp>
#include <eosio/wallet_plugin/wallet_plugin.hpp>
#include <eosio/wallet_api_plugin/wallet_api_plugin.hpp>
#include <eosio/version/version.hpp>

#include <fc/log/logger_config.hpp>
#include <fc/exception/exception.hpp>
Expand Down Expand Up @@ -33,6 +34,8 @@ bfs::path determine_home_directory()
int main(int argc, char** argv)
{
try {
app().set_version_string(eosio::version::version_client());
app().set_full_version_string(eosio::version::version_full());
bfs::path home = determine_home_directory();
app().set_default_data_dir(home / "eosio-wallet");
app().set_default_config_dir(home / "eosio-wallet");
Expand Down
2 changes: 1 addition & 1 deletion programs/nodeos/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ else()
endif()

target_link_libraries( ${NODE_EXECUTABLE_NAME}
PRIVATE appbase
PRIVATE appbase version
PRIVATE -Wl,${whole_archive_flag} login_plugin -Wl,${no_whole_archive_flag}
PRIVATE -Wl,${whole_archive_flag} history_plugin -Wl,${no_whole_archive_flag}
PRIVATE -Wl,${whole_archive_flag} state_history_plugin -Wl,${no_whole_archive_flag}
Expand Down
5 changes: 4 additions & 1 deletion programs/nodeos/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <eosio/http_plugin/http_plugin.hpp>
#include <eosio/net_plugin/net_plugin.hpp>
#include <eosio/producer_plugin/producer_plugin.hpp>
#include <eosio/version/version.hpp>

#include <fc/log/logger_config.hpp>
#include <fc/log/appender.hpp>
Expand Down Expand Up @@ -82,6 +83,8 @@ int main(int argc, char** argv)
{
try {
app().set_version(eosio::nodeos::config::version);
app().set_version_string(eosio::version::version_client());
app().set_full_version_string(eosio::version::version_full());

auto root = fc::app_path();
app().set_default_data_dir(root / "eosio" / nodeos::config::node_executable_name / "data" );
Expand All @@ -91,7 +94,7 @@ int main(int argc, char** argv)
.default_http_port = 8888
});
if(!app().initialize<chain_plugin, net_plugin, producer_plugin>(argc, argv)) {
if(app().get_options().count("help") || app().get_options().count("version")) {
if(app().get_options().count("help") || app().get_options().count("version") || app().get_options().count("full-version")) {
return SUCCESS;
}
return INITIALIZE_FAIL;
Expand Down