fix: secp256k1 instruction should accept 64 byte public key (#15584)

This commit is contained in:
Justin Starry
2021-03-02 09:01:31 +08:00
committed by GitHub
parent 640e36287e
commit 55f357153a
2 changed files with 17 additions and 19 deletions

View File

@ -27,7 +27,7 @@ if (process.env.TEST_LIVE) {
describe('secp256k1', () => {
it('create secp256k1 instruction with public key', async () => {
const privateKey = randomPrivateKey();
const publicKey = publicKeyCreate(privateKey, false);
const publicKey = publicKeyCreate(privateKey, false).slice(1);
const message = Buffer.from('This is a message');
const messageHash = Buffer.from(
keccak_256.update(toBuffer(message)).digest(),