Don't pass last hash into UpdateServiceNodeList

It's there for polling, which we aren't doing anymore; we just got the
hash from oxend's push notification, so if it pass it in then we will
always get an "unchanged" result because we're telling oxend that we
already have the data for that hash updated.

This just drops the hash completely because we don't need it anymore.
pull/1659/head
Jason Rhinelander 3 years ago committed by Jeff Becker
parent cd6962f538
commit 40ad286bf4
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -102,11 +102,11 @@ namespace llarp
LogDebug("new block at height ", m_BlockHeight);
// don't upadate on block notification if an update is pending
if (not m_UpdatingList)
UpdateServiceNodeList(std::string{msg.data[1]});
UpdateServiceNodeList();
}
void
LokidRpcClient::UpdateServiceNodeList(std::string topblock)
LokidRpcClient::UpdateServiceNodeList()
{
nlohmann::json request, fields;
fields["pubkey_ed25519"] = true;
@ -114,8 +114,6 @@ namespace llarp
fields["funded"] = true;
fields["active"] = true;
request["fields"] = fields;
if (not topblock.empty())
request["poll_block_hash"] = topblock;
m_UpdatingList = true;
Request(
"rpc.get_service_nodes",
@ -169,7 +167,7 @@ namespace llarp
};
m_lokiMQ->add_timer(makePingRequest, PingInterval);
// initial fetch of service node list
UpdateServiceNodeList("");
UpdateServiceNodeList();
}
void

@ -56,7 +56,7 @@ namespace llarp
Command(std::string_view cmd);
void
UpdateServiceNodeList(std::string topblock);
UpdateServiceNodeList();
template <typename HandlerFunc_t, typename Args_t>
void

Loading…
Cancel
Save