Skip to content
This repository has been archived by the owner on Mar 3, 2020. It is now read-only.

Task/iscroggin/kep 368 #59

Merged
merged 5 commits into from
Jun 23, 2018
Merged

Task/iscroggin/kep 368 #59

merged 5 commits into from
Jun 23, 2018

Conversation

isabelsavannah
Copy link
Contributor

First commit is the changes from last time squashed, second is changes since then.

raft/raft.cpp Outdated

for (const auto& peer : this->peers) {
auto ep = boost::asio::ip::tcp::endpoint{boost::asio::ip::address_v4::from_string(peer.host), peer.port};
this->node->send_message(ep, json_ptr);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't bother with the temporary and construct and endpoint in the send_message call.


void
audit::start()
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like wrapping this in a lambda called by std::call_once

audit/audit.cpp Outdated
using namespace bzn;

audit::audit(std::shared_ptr<bzn::node_base> node): node(node)
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd format this as:

audit::audit(...)
: node(node)
{
}
a bit easier to read

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please also use std::move(node)

audit/audit.cpp Outdated
return this->recorded_errors;
}

uint
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use size_t

audit/audit.hpp Outdated
const std::list<std::string>& error_strings() const override;

void handle(const bzn::message& message, std::shared_ptr<bzn::session_base> session) override;
void handle_commit(const commit_notification&);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't these also be in audit_base?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My not need the abstract base class if we don't intend to mock this.

Copy link
Contributor

@ebruck ebruck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few things...

Copy link
Contributor

@ebruck ebruck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remember to change the commit message to follow our standard format: KEP-368 <title>

@isabelsavannah isabelsavannah merged commit dcfbea9 into devel Jun 23, 2018
@isabelsavannah isabelsavannah deleted the task/iscroggin/KEP-368 branch June 25, 2018 18:20
amastracci pushed a commit that referenced this pull request Jun 30, 2018
KEP-368: Swarm Monitoring
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants