0

I am trying to run some tests on my altcoin, it says base58 mismatch. What is this error?

$ ./src/test/test_altcoin
Running 262 test cases...
test/base58_tests.cpp:164: error: in "base58_tests/base58_keys_valid_parse": !IsValid:["LdwLvykqj2nUH3MWcut6mtjHxVxVFC7st5","cd463dbc6f8076c7021f2766b36ea7e19c5c9e2e",{"addrType":"pubkey","isPrivkey":false,"isTestnet":false}]
test/base58_tests.cpp:167: error: in "base58_tests/base58_keys_valid_parse": addrType mismatch["LdwLvykqj2nUH3MWcut6mtjHxVxVFC7st5","cd463dbc6f8076c7021f2766b36ea7e19c5c9e2e",{"addrType":"pubkey","isPrivkey":false,"isTestnet":false}]
test/base58_tests.cpp:164: error: in "base58_tests/base58_keys_valid_parse": !IsValid:["mmCKZS7toE69QgXNs1JZcjW6LFj8LfUbz6","3e4a9a4a79dcad8800b6cfcdf102bf98064b7454",{"addrType":"pubkey","isPrivkey":false,"isTestnet":true}]
test/base58_tests.cpp:167: error: in "base58_tests/base58_keys_valid_parse": addrType mismatch["mmCKZS7toE69QgXNs1JZcjW6LFj8LfUbz6","3e4a9a4a79dcad8800b6cfcdf102bf98064b7454",{"addrType":"pubkey","isPrivkey":false,"isTestnet":true}]
test/base58_tests.cpp:164: error: in "base58_tests/base58_keys_valid_parse": !IsValid:["LWZR9ybwmT8vSXP6tmrBX4b6nE9o94AjQG","7c57bc50a38d8377ad55260f29f2c8619846ef08",{"addrType":"pubkey","isPrivkey":false,"isTestnet":false}]
test/base58_tests.cpp:167: error: in "base58_tests/base58_keys_valid_parse": addrType mismatch["LWZR9ybwmT8vSXP6tmrBX4b6nE9o94AjQG","7c57bc50a38d8377ad55260f29f2c8619846ef08",{"addrType":"pubkey","isPrivkey":false,"isTestnet":false}]
test/base58_tests.cpp:164: error: in "base58_tests/base58_keys_valid_parse": !IsValid:["mvJg85FLYqN7xAcZeFZRVg7pMbJ53BqKmy","a237653c5ae7e18e840d6463d380701ce3ba5035",{"addrType":"pubkey","isPrivkey":false,"isTestnet":true}]

I have set the following in my chainparams.cpp in my testnet.

        base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,11);
        base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,196);
        base58Prefixes[SCRIPT_ADDRESS2] = std::vector<unsigned char>(1,58);
        base58Prefixes[SECRET_KEY] =     std::vector<unsigned char>(1,239);
        base58Prefixes[EXT_PUBLIC_KEY] = {0x04, 0x35, 0x87, 0xCF};
        base58Prefixes[EXT_SECRET_KEY] = {0x04, 0x35, 0x83, 0x94};

As you can see the public keys for my coin start with 'c'. Any insight would be much helpful.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.