Currently oppy just uses a counter to assign IDs to circuits and streams that increments after every assignment. If, during one run of oppy without restarting, more than 65535 circuits or streams are created this will cause some icky and non-intuitive failures (the ID won't fit in 2 bytes anymore).
oppy needs better circuit/stream ID assignments that can both:
rollover after hitting the max ID (max ID affected by Link Protocol version in use)
not assign the same ID to two objects still in-use (for instance, if a single circuit is extremely long-lived and has a ton of streams, when the counter rolls over back to 1, it shouldn't assign a new stream to ID 1 if one already exists with that ID)
Currently oppy just uses a counter to assign IDs to circuits and streams that increments after every assignment. If, during one run of oppy without restarting, more than 65535 circuits or streams are created this will cause some icky and non-intuitive failures (the ID won't fit in 2 bytes anymore).
oppy needs better circuit/stream ID assignments that can both: