MCPcopy Create free account
hub / github.com/ElementsProject/elements / rand_keys

Method rand_keys

test/functional/wallet_taproot.py:197–207  ·  view source on GitHub ↗
(n)

Source from the content-addressed store, hash-verified

195
196 @staticmethod
197 def rand_keys(n):
198 ret = []
199 idxes = set()
200 for _ in range(n):
201 while True:
202 i = random.randrange(len(KEYS))
203 if not i in idxes:
204 break
205 idxes.add(i)
206 ret.append(KEYS[i])
207 return ret
208
209 @staticmethod
210 def make_desc(pattern, privmap, keys, pub_only = False):

Callers 1

do_testMethod · 0.95

Calls 2

randrangeMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected