instead of addTransportFromQr(), we need a dedicated api called initTransports(qrCode: Option<String>) 1.
the api adds automatically up to 3 relays, preferring relays from the QR code.
the new api does roughly:
- creates a randomized list of the hardcoded relays
- if the scanned qrCode is
DCLOGIN: or DCACCOUNT:, pass it to addTransportFromQr()
- or if the scanned qrCode is a securejoin, add all relays to the beginning of relay candidates
- configure the first relay if not done in 2., going through the list. Multiple relays should be tried concurrently.
- other relays are added in the background as now with maybe_add_additional_relays()
instead of
addTransportFromQr(), we need a dedicated api calledinitTransports(qrCode: Option<String>)1.the api adds automatically up to 3 relays, preferring relays from the QR code.
the new api does roughly:
DCLOGIN:orDCACCOUNT:, pass it to addTransportFromQr()Footnotes
reason is that the qrCode passed there might be secure-join links, that are used as relay candidates.
Config::Autorelayis completely internal afterwards for now (it might become interesting when we introduce automatic relay deletion/addition) ↩