Author

Topic: Why it does not change script address prefix? (Read 131 times)

jr. member
Activity: 413
Merit: 5
What exactly are the lines you changed (as in post the code snippets for your changes).
chainparams.cpp,   CMainParam part, line number 133~135

base58Prefixes[PUBKEY_ADDRESS] = std::vector(1,33);
base58Prefixes[SCRIPT_ADDRESS] = std::vector(1,33);
base58Prefixes[SCRIPT_ADDRESS2] = std::vector(1,33);
staff
Activity: 3458
Merit: 6793
Just writing some code
What exactly are the lines you changed (as in post the code snippets for your changes).
jr. member
Activity: 413
Merit: 5
Are you sure that the addresses you are getting are P2SH addresses? The default used to be P2PKH, and unless you are modifying the latest code, that's all you are going to get. P2PKH prefixes are not governed by the prefix corresponding to SCRIPT_ADDRESS.



If you don't know what those mean, then you need to do more research.
I know p2sh, p2pkh, so how to change '3' to another character? I have changed all 5 value of prefix to 33 which is for 'E', but not worked.
staff
Activity: 3458
Merit: 6793
Just writing some code
February 28, 2018, 07:23:21 PM
#2
Are you sure that the addresses you are getting are P2SH addresses? The default used to be P2PKH, and unless you are modifying the latest code, that's all you are going to get. P2PKH prefixes are not governed by the prefix corresponding to SCRIPT_ADDRESS.



If you don't know what those mean, then you need to do more research.
jr. member
Activity: 413
Merit: 5
February 28, 2018, 09:14:34 AM
#1
I revised base58Prefixes[SCRIPT_ADDRESS1, 2] = std::vector(1, 33)  at source file, chainparams.cpp,

and compiled with [make, make install],

but when I run xxxcoin-qt, and address checked, it doesn't changed at all, why?
Jump to: