addess PR issues
This commit is contained in:
parent
9f58dcb544
commit
528a5ca611
|
@ -28,7 +28,7 @@ export class G1point {
|
||||||
return new G1point(sum);
|
return new G1point(sum);
|
||||||
}
|
}
|
||||||
|
|
||||||
public addRaW(other: bytes48): G1point {
|
public addRaw(other: bytes48): G1point {
|
||||||
return this.add(G1point.fromBytesCompressed(other));
|
return this.add(G1point.fromBytesCompressed(other));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -106,7 +106,7 @@ export function verifyMultiple(publicKeys: BLSPubkey[], messageHashes: bytes32[]
|
||||||
return {
|
return {
|
||||||
hash: previous.hash,
|
hash: previous.hash,
|
||||||
publicKey: previous.publicKey ?
|
publicKey: previous.publicKey ?
|
||||||
previous.publicKey.addRaW(publicKeys[index])
|
previous.publicKey.addRaw(publicKeys[index])
|
||||||
:
|
:
|
||||||
G1point.fromBytesCompressed(publicKeys[index]),
|
G1point.fromBytesCompressed(publicKeys[index]),
|
||||||
};
|
};
|
||||||
|
@ -139,7 +139,6 @@ export function verifyMultiple(publicKeys: BLSPubkey[], messageHashes: bytes32[]
|
||||||
const e2 = ElipticCurvePairing.pair(G1point.generator(), sig);
|
const e2 = ElipticCurvePairing.pair(G1point.generator(), sig);
|
||||||
return e2.equals(eCombined);
|
return e2.equals(eCombined);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue