Fix pubkey parameter name in ping endpoints

Lokinet and SS are actually sending `pubkey_ed25519` for the parameter,
but oxen-core is expecting `ed25519_pubkey`.  Fixes oxen-core to match
what lokinet/ss are actually sending.
This commit is contained in:
Jason Rhinelander 2023-01-11 15:02:40 -04:00
parent a62209e6ed
commit 3ba73ebf18
No known key found for this signature in database
GPG Key ID: C4992CE7A88D4262
3 changed files with 6 additions and 6 deletions

View File

@ -3341,7 +3341,7 @@ namespace cryptonote { namespace rpc {
m_core.ss_version = req.version;
return handle_ping<STORAGE_SERVER_PING>(m_core,
req.version, service_nodes::MIN_STORAGE_SERVER_VERSION,
req.ed25519_pubkey, req.error,
req.pubkey_ed25519, req.error,
"Storage Server", m_core.m_last_storage_server_ping, m_core.get_net_config().UPTIME_PROOF_FREQUENCY,
[this, &req](bool significant) {
m_core.m_storage_https_port = req.https_port;
@ -3356,7 +3356,7 @@ namespace cryptonote { namespace rpc {
m_core.lokinet_version = req.version;
return handle_ping<LOKINET_PING>(m_core,
req.version, service_nodes::MIN_LOKINET_VERSION,
req.ed25519_pubkey, req.error,
req.pubkey_ed25519, req.error,
"Lokinet", m_core.m_last_lokinet_ping, m_core.get_net_config().UPTIME_PROOF_FREQUENCY,
[this](bool significant) { if (significant) m_core.reset_proof_interval(); });
}

View File

@ -1235,14 +1235,14 @@ KV_SERIALIZE_MAP_CODE_BEGIN(STORAGE_SERVER_PING::request)
KV_SERIALIZE(version);
KV_SERIALIZE(https_port);
KV_SERIALIZE(omq_port);
KV_SERIALIZE(ed25519_pubkey);
KV_SERIALIZE(pubkey_ed25519);
KV_SERIALIZE(error);
KV_SERIALIZE_MAP_CODE_END()
KV_SERIALIZE_MAP_CODE_BEGIN(LOKINET_PING::request)
KV_SERIALIZE(version);
KV_SERIALIZE(ed25519_pubkey);
KV_SERIALIZE(pubkey_ed25519);
KV_SERIALIZE(error);
KV_SERIALIZE_MAP_CODE_END()

View File

@ -2215,7 +2215,7 @@ namespace rpc {
std::array<uint16_t, 3> version; // Storage server version
uint16_t https_port; // Storage server https port to include in uptime proofs
uint16_t omq_port; // Storage Server oxenmq port to include in uptime proofs
std::string ed25519_pubkey; // Service node Ed25519 pubkey for verifying that storage server is using the right one
std::string pubkey_ed25519; // Service node Ed25519 pubkey for verifying that storage server is using the right one
std::string error; // If given and non-empty then this is an error message telling oxend to *not* submit an uptime proof and to report this error in the logs instead. Oxend won't send proofs until it gets another ping (without an error).
KV_MAP_SERIALIZABLE
};
@ -2231,7 +2231,7 @@ namespace rpc {
struct request
{
std::array<uint16_t, 3> version; // Lokinet version
std::string ed25519_pubkey; // Service node Ed25519 pubkey for verifying that lokinet is using the right one
std::string pubkey_ed25519; // Service node Ed25519 pubkey for verifying that lokinet is using the right one
std::string error; // If given and non-empty then this is an error message telling oxend to *not* submit an uptime proof and to report this error in the logs instead. Oxend won't send proofs until it gets another ping (without an error).
KV_MAP_SERIALIZABLE
};