mirror of
https://github.com/logos-co/logos-libp2p-module.git
synced 2026-08-31 01:41:12 +00:00
ci(tutorials): add smoke test for code (#85)
This commit is contained in:
@@ -102,7 +102,13 @@ int main()
|
||||
}
|
||||
|
||||
/// ## Step 3: Get Node A's address and connect Node B
|
||||
auto infoA = nodeA.peerInfo().value;
|
||||
auto infoARes = nodeA.peerInfo();
|
||||
if (!infoARes.success) {
|
||||
fprintf(stderr, "Failed to get Node A info: %s\n",
|
||||
infoARes.error.c_str());
|
||||
return 1;
|
||||
}
|
||||
auto infoA = infoARes.value;
|
||||
std::string peerIdA = infoA["peerId"].get<std::string>();
|
||||
std::vector<std::string> addrsA;
|
||||
for (const auto& a : infoA["addrs"])
|
||||
@@ -225,4 +231,4 @@ int main()
|
||||
///
|
||||
/// ```bash
|
||||
/// ./build/tutorial/tutorial_4_custom_protocol
|
||||
/// ```
|
||||
/// ```
|
||||
|
||||
Reference in New Issue
Block a user