mirror of
https://github.com/logos-co/logos-libp2p-module.git
synced 2026-09-02 10:51:09 +00:00
refresh
This commit is contained in:
@@ -66,7 +66,7 @@ Once the node is running, we can inspect its identity and
|
||||
network addresses using `peerInfo()`.
|
||||
|
||||
```cpp
|
||||
auto info = node.peerInfo();
|
||||
StdLogosResult info = node.peerInfo();
|
||||
if (!info.success) {
|
||||
fprintf(stderr, "Failed to get peer info: %s\n",
|
||||
info.error.c_str());
|
||||
@@ -88,7 +88,7 @@ network addresses using `peerInfo()`.
|
||||
We can also query specific fields using `getNodeInfo()`:
|
||||
|
||||
```cpp
|
||||
auto version = node.getNodeInfo("Version");
|
||||
StdLogosResult version = node.getNodeInfo("Version");
|
||||
if (!version.success) {
|
||||
fprintf(stderr, "Failed to get module version: %s\n",
|
||||
version.error.c_str());
|
||||
@@ -97,7 +97,7 @@ We can also query specific fields using `getNodeInfo()`:
|
||||
printf("Module version: %s\n",
|
||||
version.value.get<std::string>().c_str());
|
||||
|
||||
auto peerIdResult = node.getNodeInfo("PeerId");
|
||||
StdLogosResult peerIdResult = node.getNodeInfo("PeerId");
|
||||
if (!peerIdResult.success) {
|
||||
fprintf(stderr, "Failed to get peer ID: %s\n",
|
||||
peerIdResult.error.c_str());
|
||||
@@ -136,4 +136,4 @@ In this tutorial you learned how to:
|
||||
```
|
||||
---
|
||||
|
||||
<p align="center"><a href="tutorial_2_custom_config.md">Custom Node Configuration →</a></p>
|
||||
<p align="center"><a href="tutorial_0_introduction.md">← Introduction and Common Patterns</a> | <a href="tutorial_2_custom_config.md">Custom Node Configuration →</a></p>
|
||||
|
||||
Reference in New Issue
Block a user