Skip to content

Commit

Permalink
feat: change makeBytes first argument from KeyPair to PublicKey
Browse files Browse the repository at this point in the history
  • Loading branch information
Georgi Grigorov committed Nov 25, 2024
1 parent 92d76d7 commit fbc933b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Binary file not shown.
3 changes: 2 additions & 1 deletion src/main/java/com/limechain/babe/Authorship.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,13 @@ private static BabePreDigest claimPrimarySlot(byte[] randomness,

var authorityIndex = entry.getKey();
var keyPair = entry.getValue();
var publicKey = new Schnorrkel.PublicKey(keyPair.getPublicKey());

var threshold = calculatePrimaryThreshold(c, authorities, authorityIndex);

Schnorrkel schnorrkel = Schnorrkel.getInstance();
VrfOutputAndProof vrfOutputAndProof = schnorrkel.vrfSign(keyPair, transcript);
byte[] vrfBytes = schnorrkel.makeBytes(keyPair, transcript, vrfOutputAndProof);
byte[] vrfBytes = schnorrkel.makeBytes(publicKey, transcript, vrfOutputAndProof);

if (vrfBytes.length != 16) {
throw new IllegalArgumentException("VRF byte array must be exactly 16 bytes long");
Expand Down

0 comments on commit fbc933b

Please sign in to comment.