docs(tutorial): add introduction tutorial (#90)

This commit is contained in:
vladopajic
2026-07-24 14:14:38 +00:00
committed by GitHub
parent 7db2524898
commit eb8f89f3af
25 changed files with 868 additions and 353 deletions
+10 -6
View File
@@ -61,13 +61,15 @@ int main()
Libp2pModuleImpl node(options);
if (!node.start().success) {
fprintf(stderr, "Failed to start node\n");
StdLogosResult startRes = node.start();
if (!startRes.success) {
fprintf(stderr, "Failed to start node: %s\n",
startRes.error.c_str());
return 1;
}
/// Verify that the node is actually listening on the configured port:
auto info = node.peerInfo();
StdLogosResult info = node.peerInfo();
if (!info.success) {
fprintf(stderr, "Failed to get node info: %s\n",
info.error.c_str());
@@ -115,12 +117,14 @@ int main()
Libp2pModuleImpl nodeFromJson(jsonOpts);
if (!nodeFromJson.start().success) {
fprintf(stderr, "Failed to start JSON-configured node\n");
StdLogosResult jsonStartRes = nodeFromJson.start();
if (!jsonStartRes.success) {
fprintf(stderr, "Failed to start JSON-configured node: %s\n",
jsonStartRes.error.c_str());
return 1;
}
auto info2 = nodeFromJson.peerInfo();
StdLogosResult info2 = nodeFromJson.peerInfo();
if (!info2.success) {
fprintf(stderr, "Failed to get JSON-configured node info: %s\n",
info2.error.c_str());