From a4e22639f346e7a0fbc71f0338fc3e9d9709cea7 Mon Sep 17 00:00:00 2001 From: protolambda Date: Wed, 15 May 2019 18:37:11 +0200 Subject: [PATCH] fix/update bls funcs for testing --- test_libs/pyspec/eth2spec/utils/bls.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/test_libs/pyspec/eth2spec/utils/bls.py b/test_libs/pyspec/eth2spec/utils/bls.py index daeb361a9..23a9a7529 100644 --- a/test_libs/pyspec/eth2spec/utils/bls.py +++ b/test_libs/pyspec/eth2spec/utils/bls.py @@ -22,4 +22,18 @@ def bls_aggregate_pubkeys(pubkeys): if bls_active: return bls.aggregate_pubkeys(pubkeys) else: - return b'\x42' * 96 + return b'\xaa' * 48 + + +def bls_aggregate_signatures(signatures): + if bls_active: + return bls.aggregate_signatures(signatures) + else: + return b'\x22' * 96 + + +def bls_sign(message_hash, privkey, domain): + if bls_active: + return bls.sign(message_hash=message_hash, privkey=privkey, domain=domain) + else: + return b'\x11' * 96