From b98fbcc65704999cd34308b74dba5b72ebdff0f1 Mon Sep 17 00:00:00 2001
From: Nicolas Pope <nicolas.pope@utu.fi>
Date: Tue, 10 May 2022 18:35:26 +0100
Subject: [PATCH] Debug output for net test

---
 src/peer.cpp             | 1 +
 test/net_integration.cpp | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/peer.cpp b/src/peer.cpp
index d122eff..14b85db 100644
--- a/src/peer.cpp
+++ b/src/peer.cpp
@@ -538,6 +538,7 @@ bool Peer::waitConnection(int s) {
 	});
 
 	cv.wait_for(lk, seconds(s), [this]() { return status_ == NodeStatus::kConnected;});
+	LOG(ERROR) << "CONN STAT = " << int(status_);
 	return status_ == NodeStatus::kConnected;
 }
 
diff --git a/test/net_integration.cpp b/test/net_integration.cpp
index 1fa6d94..1ba5701 100644
--- a/test/net_integration.cpp
+++ b/test/net_integration.cpp
@@ -76,7 +76,7 @@ TEST_CASE("Listen and Connect", "[net]") {
 		
 		bool disconnected_once = false;
 
-		auto h = ftl::getSelf()->onConnect([&](const std::shared_ptr<ftl::protocol::Node> &p_listening) {
+		auto h = self->onConnect([&](const std::shared_ptr<ftl::protocol::Node> &p_listening) {
 			if (!disconnected_once) {
 				// remote closes on first connection
 				disconnected_once = true;
-- 
GitLab