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

Function random_bytes

test/functional/feature_taproot.py:630–632  ·  view source on GitHub ↗

Return a random bytes object of length n.

(n)

Source from the content-addressed store, hash-verified

628 return bytes(ret)
629
630def random_bytes(n):
631 """Return a random bytes object of length n."""
632 return bytes(random.getrandbits(8) for i in range(n))
633
634def bitflipper(expr):
635 """Return a callable that evaluates expr and returns it with a random bitflip."""

Callers 1

spenders_taproot_activeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected