Skip to content

Commit

Permalink
Merge pull request #1414 from bitshares/release
Browse files Browse the repository at this point in the history
merge release to master
  • Loading branch information
oxarbitrage authored Nov 2, 2018
2 parents 6218cdf + 09a2edb commit 3ea5287
Show file tree
Hide file tree
Showing 78 changed files with 2,988 additions and 1,377 deletions.
14 changes: 8 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,14 @@ if( WIN32 )

set(CRYPTO_LIB)

#looks like this flag can have different default on some machines.
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH:NO")
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO")

# Probably cmake has a bug and vcxproj generated for executable in Debug conf. has disabled debug info
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /DEBUG")
if( MSVC )
#looks like this flag can have different default on some machines.
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH:NO")
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO")

# Probably cmake has a bug and vcxproj generated for executable in Debug conf. has disabled debug info
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /DEBUG")
endif ( MSVC )

# On windows tcl should be installed to the directory pointed by setenv.bat script
SET(TCL_INCLUDE_PATH $ENV{TCL_ROOT}/include)
Expand Down
1 change: 1 addition & 0 deletions libraries/app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ add_library( graphene_app
util.cpp
database_api.cpp
plugin.cpp
config_util.cpp
${HEADERS}
${EGENESIS_HEADERS}
)
Expand Down
4 changes: 2 additions & 2 deletions libraries/app/api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -384,9 +384,9 @@ namespace graphene { namespace app {


vector<operation_history_object> history_api::get_relative_account_history( const std::string account_id_or_name,
uint32_t stop,
uint64_t stop,
unsigned limit,
uint32_t start) const
uint64_t start) const
{
FC_ASSERT( _app.chain_database() );
const auto& db = *_app.chain_database();
Expand Down
33 changes: 19 additions & 14 deletions libraries/app/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,11 @@ void application_impl::reset_p2p_node(const fc::path& data_dir)
{
// https://bitsharestalk.org/index.php/topic,23715.0.html
vector<string> seeds = {
"seed01.liondani.com:1776", // liondani (GERMANY)
"104.236.144.84:1777", // puppies (USA)
"128.199.143.47:2015", // Harvey (Singapore)
"23.92.53.182:1776", // sahkan (USA)
"192.121.166.162:1776", // sahkan (UK)
"209.105.239.13:1776", // sahkan (USA)
"45.35.12.22:1776", // sahkan (USA)
"51.15.61.160:1776", // lafona (France)
"bts-seed1.abit-more.com:62015", // abit (China)
"node.blckchnd.com:4243", // blckchnd (Germany)
Expand Down Expand Up @@ -336,20 +337,23 @@ void application_impl::startup()
genesis.initial_timestamp -= ( genesis.initial_timestamp.sec_since_epoch()
% genesis.initial_parameters.block_interval );
modified_genesis = true;
std::cerr << "Used genesis timestamp: " << genesis.initial_timestamp.to_iso_string()
<< " (PLEASE RECORD THIS)\n";

ilog(
"Used genesis timestamp: ${timestamp} (PLEASE RECORD THIS)",
("timestamp", genesis.initial_timestamp.to_iso_string())
);
}
if( _options->count("dbg-init-key") )
{
std::string init_key = _options->at( "dbg-init-key" ).as<string>();
FC_ASSERT( genesis.initial_witness_candidates.size() >= genesis.initial_active_witnesses );
set_dbg_init_key( genesis, init_key );
modified_genesis = true;
std::cerr << "Set init witness key to " << init_key << "\n";
ilog("Set init witness key to ${init_key}", ("init_key", init_key));
}
if( modified_genesis )
{
std::cerr << "WARNING: GENESIS WAS MODIFIED, YOUR CHAIN ID MAY BE DIFFERENT\n";
wlog("WARNING: GENESIS WAS MODIFIED, YOUR CHAIN ID MAY BE DIFFERENT");
genesis_str += "BOGUS";
genesis.initial_chain_id = fc::sha256::hash( genesis_str );
}
Expand Down Expand Up @@ -409,9 +413,8 @@ void application_impl::startup()
_force_validate = true;
}

// TODO uncomment this when GUI is ready
//if( _options->count("enable-subscribe-to-all") )
// _app_options.enable_subscribe_to_all = _options->at("enable-subscribe-to-all").as<bool>();
if ( _options->count("enable-subscribe-to-all") )
_app_options.enable_subscribe_to_all = _options->at( "enable-subscribe-to-all" ).as<bool>();

if( _active_plugins.find( "market_history" ) != _active_plugins.end() )
_app_options.has_market_history_plugin = true;
Expand Down Expand Up @@ -502,10 +505,11 @@ bool application_impl::handle_block(const graphene::net::block_message& blk_msg,
const auto& witness = blk_msg.block.witness(*_chain_db);
const auto& witness_account = witness.witness_account(*_chain_db);
auto last_irr = _chain_db->get_dynamic_global_properties().last_irreversible_block_num;
ilog("Got block: #${n} ${bid} time: ${t} latency: ${l} ms from: ${w} irreversible: ${i} (-${d})",
ilog("Got block: #${n} ${bid} time: ${t} transaction(s): ${x} latency: ${l} ms from: ${w} irreversible: ${i} (-${d})",
("t",blk_msg.block.timestamp)
("n", blk_msg.block.block_num())
("bid", blk_msg.block.id())
("x", blk_msg.block.transactions.size())
("l", (latency.count()/1000))
("w",witness_account.name)
("i",last_irr)("d",blk_msg.block.block_num()-last_irr) );
Expand All @@ -529,10 +533,12 @@ bool application_impl::handle_block(const graphene::net::block_message& blk_msg,
// happens, there's no reason to fetch the transactions, so construct a list of the
// transaction message ids we no longer need.
// during sync, it is unlikely that we'll see any old
contained_transaction_message_ids.reserve( contained_transaction_message_ids.size()
+ blk_msg.block.transactions.size() );
for (const processed_transaction& transaction : blk_msg.block.transactions)
{
graphene::net::trx_message transaction_message(transaction);
contained_transaction_message_ids.push_back(graphene::net::message(transaction_message).id());
contained_transaction_message_ids.emplace_back(graphene::net::message(transaction_message).id());
}
}

Expand Down Expand Up @@ -943,12 +949,11 @@ void application::set_program_options(boost::program_options::options_descriptio
("api-access", bpo::value<boost::filesystem::path>(), "JSON file specifying API permissions")
("plugins", bpo::value<string>(), "Space-separated list of plugins to activate")
("io-threads", bpo::value<uint16_t>()->implicit_value(0), "Number of IO threads, default to 0 for auto-configuration")
("enable-subscribe-to-all", bpo::value<bool>()->implicit_value(true),
"Whether allow API clients to subscribe to universal object creation and removal events")
("enable-standby-votes-tracking", bpo::value<bool>()->implicit_value(true),
"Whether to enable tracking of votes of standby witnesses and committee members. "
"Set it to true to provide accurate data to API clients, set to false for slightly better performance.")
// TODO uncomment this when GUI is ready
//("enable-subscribe-to-all", bpo::value<bool>()->implicit_value(false),
// "Whether allow API clients to subscribe to universal object creation and removal events")
;
command_line_options.add(configuration_file_options);
command_line_options.add_options()
Expand Down
Loading

0 comments on commit 3ea5287

Please sign in to comment.