mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-17 15:25:35 +00:00
0e576ff59e
This aligns service node updating logic a bit closer to what happens in storage server, and should make it a bit more resilient, hopefully tracking down the (off-Github) reported issue where lokinet sometimes doesn't see itself as active. - Initiate a service node list update in the 30s timer lokinet ping timer (in case we miss a block notify for some reason); although this is expensive, the next point mitigates it: - Retrieve the block hash with the SN state update, and feed it back into the next get_service_nodes call (as "poll_block_hash") so that oxend just sends back a mostly-empty response when the block hasn't changed, allowing both oxend and lokinet to skip nearly all of the work of a service node list update when the block hasn't changed since the last poll. (This was already partially implemenated--we were already looking for "unchanged"--but without a block hash to get from and pass back to oxend we'd never actually get an "unchanged" result). - Tighten up the service node list handling by moving the "unchanged" handling into the get_service_nodes response handler: this way the HandleNewServiceNodeList function is only handling the list but not the logic as to whether there actually is a new list or not. |
||
---|---|---|
.. | ||
android | ||
apple | ||
config | ||
consensus | ||
constants | ||
crypto | ||
dht | ||
dns | ||
ev | ||
exit | ||
handlers | ||
iwp | ||
link | ||
linux | ||
messages | ||
net | ||
path | ||
peerstats | ||
quic | ||
router | ||
routing | ||
rpc | ||
service | ||
simulation | ||
tooling | ||
util | ||
vpn | ||
win32 | ||
app.xml | ||
bootstrap-fallbacks.cpp.in | ||
bootstrap.cpp | ||
bootstrap.hpp | ||
CMakeLists.txt | ||
context.cpp | ||
endpoint_base.cpp | ||
endpoint_base.hpp | ||
lokinet_shared.cpp | ||
nodedb.cpp | ||
nodedb.hpp | ||
pow.cpp | ||
pow.hpp | ||
profiling.cpp | ||
profiling.hpp | ||
router_contact.cpp | ||
router_contact.hpp | ||
router_id.cpp | ||
router_id.hpp | ||
router_version.cpp | ||
router_version.hpp |