mirror of https://github.com/oxen-io/lokinet
add public key in rpc ping
This commit is contained in:
parent
f702aacc38
commit
768ed30c05
|
@ -7,6 +7,7 @@
|
|||
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <oxenc/bt.h>
|
||||
#include <oxenc/hex.h>
|
||||
#include <llarp/util/time.hpp>
|
||||
|
||||
namespace llarp
|
||||
|
@ -147,7 +148,12 @@ namespace llarp
|
|||
constexpr auto PingInterval = 30s;
|
||||
auto makePingRequest = [self = shared_from_this()]() {
|
||||
// send a ping
|
||||
nlohmann::json payload = {{"version", {VERSION[0], VERSION[1], VERSION[2]}}};
|
||||
PubKey pk{};
|
||||
if (auto r = self->m_Router.lock())
|
||||
pk = r->pubkey();
|
||||
nlohmann::json payload = {
|
||||
{"pubkey_ed25519", oxenc::to_hex(pk.begin(), pk.end())},
|
||||
{"version", {VERSION[0], VERSION[1], VERSION[2]}}};
|
||||
self->Request(
|
||||
"admin.lokinet_ping",
|
||||
[](bool success, std::vector<std::string> data) {
|
||||
|
|
Loading…
Reference in New Issue