Skip to content

Fix the function call #1

@Alf71

Description

@Alf71

Open the file secp256k1_lib.cpp and go to line 187. Change:
cpp

pk = Secp256K1::DecodePrivateKey2(wif);

to:
cpp

pk = Secp256K1::DecodePrivateKey(wif);

Also check the function signature:

Looking at the header, the function signature is:
cpp

static Int DecodePrivateKey(char *key, bool *compressed);

It expects a second parameter bool *compressed to return whether the key is compressed. You'll need to update the function call to match this signature.

In secp256k1_lib.cpp, find the wif_to_privatekey function and modify it:
cpp

void wif_to_privatekey(char* wif, unsigned char* pk) {
bool compressed;
Int privKey = Secp256K1::DecodePrivateKey(wif, &compressed);
privKey.Get32Bytes(pk);
}

You may also want to handle the compressed flag if needed for your application.

After making these changes, run make again and it should compile successfully.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions