Open
Description
Hello brother. When i try to get my address from PK using the below code, it returns an error of [libsecp256k1] illegal argument: secp256k1_ecmult_gen_context_is_built(&ctx->ecmult_gen_ctx)
the coed is
#include <ethc/account.h>
#include <ethc/hex.h>
#include <ethc/keccak256.h>
#include <iostream>
using namespace std;
void test_eth_account_address_get()
{
struct eth_account account;
uint8_t privkey[32] = {0xdc, 0xdf, 0x91, 0xb7, 0xb2, 0x9c, 0x4c, 0x06,
0x77, 0x33, 0x1b, 0x65, 0x5c, 0x0c, 0x6c, 0xf4,
0xe7, 0x1b, 0x6f, 0x87, 0x19, 0x27, 0x3a, 0x11,
0x2e, 0xe6, 0x5b, 0x63, 0x9b, 0x88, 0x8f, 0xfa};
char out[40];
eth_account_from_privkey(&account, privkey);
eth_account_address_get(out, &account);
cout << out << endl;
}
int main()
{
test_eth_account_address_get();
}