Hi all! Thanks again for building and maintaining dag-cbor.
I noticed just now that when you call rand_cid with n > 0, it pretty much always returns duplicates. Is that intentional? As a user, I was surprised. Any chance you could consider changing that to make it always return n unique CIDs?
>>> from dag_cbor.random import rand_cid
>>> len(set(rand_cid(100)))
93
>>> len(set(rand_cid(100)))
88
>>> len(set(rand_cid(100)))
89
>>> len(set(rand_cid(100)))
85
>>> len(set(rand_cid(100)))
82
This is on dag-cbor 0.3.3, Python 3.12.11.
Hi all! Thanks again for building and maintaining dag-cbor.
I noticed just now that when you call
rand_cidwith n > 0, it pretty much always returns duplicates. Is that intentional? As a user, I was surprised. Any chance you could consider changing that to make it always return n unique CIDs?This is on dag-cbor 0.3.3, Python 3.12.11.