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

Update Confirmation Timers to be ms not sec #1442

Merged
merged 1 commit into from
Dec 12, 2018
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 rai/node/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2891,7 +2891,7 @@ void rai::election::confirm_once (rai::transaction const & transaction_a)
{
if (!confirmed.exchange (true))
{
status.election_duration = std::chrono::duration_cast<std::chrono::duration<double>> (std::chrono::steady_clock::now () - election_start);
status.election_duration = std::chrono::duration_cast<std::chrono::milliseconds> (std::chrono::steady_clock::now () - election_start);
auto winner_l (status.winner);
auto node_l (node.shared ());
auto confirmation_action_l (confirmation_action);
Expand Down
2 changes: 1 addition & 1 deletion rai/node/node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class election_status
public:
std::shared_ptr<rai::block> winner;
rai::amount tally;
std::chrono::duration<double> election_duration;
std::chrono::milliseconds election_duration;
};
class vote_info
{
Expand Down
2 changes: 1 addition & 1 deletion rai/node/rpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1446,7 +1446,7 @@ void rai::rpc_handler::confirmation_history ()
{
boost::property_tree::ptree elections;
boost::property_tree::ptree confirmation_stats;
std::chrono::duration<double> running_total (0);
std::chrono::milliseconds running_total (0);
{
std::lock_guard<std::mutex> lock (node.active.mutex);
for (auto i (node.active.confirmed.begin ()), n (node.active.confirmed.end ()); i != n; ++i)
Expand Down