Skip to content
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

Code Changes that are compatible with VS2013 #496

Closed
wants to merge 1 commit into from
Closed
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/chain/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ add_library( steemit_chain
block_database.cpp

${HEADERS}
${hardfork_hpp_file}
# ${hardfork_hpp_file}
${PROTOCOL_HEADERS}
"${CMAKE_CURRENT_BINARY_DIR}/include/steemit/chain/hardfork.hpp"
)
Expand Down
2 changes: 1 addition & 1 deletion libraries/net/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4218,7 +4218,7 @@ namespace graphene { namespace net { namespace detail {

// limit the rate at which we accept connections to mitigate DOS attacks
fc::usleep( fc::milliseconds(10) );
} FC_CAPTURE_AND_LOG( () )
} FC_CAPTURE_AND_LOG( (_user_agent_string) )
}
} // accept_loop()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class account_statistics_plugin_impl
void on_operation( const operation_object& o );

account_statistics_plugin& _self;
flat_set< uint32_t > _tracked_buckets = { 60, 3600, 21600, 86400, 604800, 2592000 };
flat_set< uint32_t > _tracked_buckets = flat_set< uint32_t > { 60, 3600, 21600, 86400, 604800, 2592000 };
uint32_t _maximum_history_per_bucket_size = 100;
flat_set< string > _tracked_accounts;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class blockchain_statistics_plugin_impl
void on_operation( const operation_object& o );

blockchain_statistics_plugin& _self;
flat_set< uint32_t > _tracked_buckets = { 60, 3600, 21600, 86400, 604800, 2592000 };
flat_set< uint32_t > _tracked_buckets = flat_set< uint32_t > { 60, 3600, 21600, 86400, 604800, 2592000 };
flat_set< bucket_object_id_type > _current_buckets;
uint32_t _maximum_history_per_bucket_size = 100;
};
Expand Down
5 changes: 4 additions & 1 deletion libraries/plugins/witness/witness.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,10 @@ void witness_plugin::on_applied_block(const steemit::chain::signed_block& b)
chain::database& db = database();

const auto& dgp = db.get_dynamic_global_properties();
double hps = (_total_hashes*1000000)/(fc::time_point::now()-_hash_start_time).count();

double divisor = (fc::time_point::now() - _hash_start_time).count();
if (divisor == 0)divisor = 1;//Division by zero,It is not compatible with windows
double hps = (_total_hashes*1000000)/divisor;
int64_t bits = (dgp.num_pow_witnesses/4) + 4;
fc::uint128 hashes = fc::uint128(1) << bits;
hashes *= 1000000;
Expand Down