Skip to content

Commit

Permalink
Merge pull request #37 from marlinprotocol/roshan/onramp
Browse files Browse the repository at this point in the history
Print unsol conn logs
  • Loading branch information
roshanr95 committed Dec 24, 2020
2 parents beaa6df + 3aee78b commit 3f638fc
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pubsub/include/marlin/pubsub/PubSubNode.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,17 @@ class PubSubNode {
delegate->manage_subscriptions(baddr, max_sol_conns, conns.sol_conns, conns.sol_standby_conns);
}

for(auto& conn : unsol_conns) {
auto* static_pk = conn->get_static_pk();
auto* remote_static_pk = conn->get_remote_static_pk();
SPDLOG_INFO(
"Node {:spn}: Unsol conn: {:spn}: rtt: {}",
spdlog::to_hex(static_pk, static_pk + crypto_box_PUBLICKEYBYTES),
spdlog::to_hex(remote_static_pk, remote_static_pk + crypto_box_PUBLICKEYBYTES),
conn->get_rtt()
);
}

// std::for_each(
// this->delegate->channels.begin(),
// this->delegate->channels.end(),
Expand Down

0 comments on commit 3f638fc

Please sign in to comment.