Bootstrap event sender doesn't always report readiness correctly
It's unclear whether this is working as intended or not, but it appears that loading a bootstrapped directory successfully from cache won't go and update the bootstrap status reported through BootstrapEvents
as hitting 100%. The most I managed to get it to was
2023-03-28T15:26:53.339788Z DEBUG arti_client::status: 45%: connecting successfully; directory is fetching authority certificates (8/8)
Since it never sets ready_for_traffic
either, consumers depending on the bootstrap event sender might mistakenly think that bootstrap is still ongoing.
You can work around this in client code by calling TorClient::bootstrap
manually and reporting completion when that function returns, but it'd be nice to have the event sender fixed;
- it seems weird that
TorClient::bootstrap
can return withoutready_for_traffic
also being set; - and it seems weird that you will only see the 100% bootstrap event state when downloading a fresh directory.
(arti 1.1.2 installed via Cargo on Linux, but the problem also happens embedded on Android)