addess PR issues

This commit is contained in:
Marin Petrunić 2019-08-29 14:14:46 +02:00
parent 9f58dcb544
commit 528a5ca611
2 changed files with 2 additions and 3 deletions

View File

@ -28,7 +28,7 @@ export class G1point {
return new G1point(sum);
}
public addRaW(other: bytes48): G1point {
public addRaw(other: bytes48): G1point {
return this.add(G1point.fromBytesCompressed(other));
}

View File

@ -106,7 +106,7 @@ export function verifyMultiple(publicKeys: BLSPubkey[], messageHashes: bytes32[]
return {
hash: previous.hash,
publicKey: previous.publicKey ?
previous.publicKey.addRaW(publicKeys[index])
previous.publicKey.addRaw(publicKeys[index])
:
G1point.fromBytesCompressed(publicKeys[index]),
};
@ -139,7 +139,6 @@ export function verifyMultiple(publicKeys: BLSPubkey[], messageHashes: bytes32[]
const e2 = ElipticCurvePairing.pair(G1point.generator(), sig);
return e2.equals(eCombined);
} catch (e) {
console.log(e);
return false;
}
}