Bitcoin Forum
June 14, 2024, 06:44:32 PM *
News: Voting for pizza day contest
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Why it does not change script address prefix?  (Read 115 times)
wsxdrfv (OP)
Jr. Member
*
Offline Offline

Activity: 405
Merit: 5


View Profile WWW
February 28, 2018, 01:14:34 PM
 #1

I revised base58Prefixes[SCRIPT_ADDRESS1, 2] = std::vector<unsigned char>(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?
achow101
Staff
Legendary
*
Offline Offline

Activity: 3430
Merit: 6704


Just writing some code


View Profile WWW
February 28, 2018, 11: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.

wsxdrfv (OP)
Jr. Member
*
Offline Offline

Activity: 405
Merit: 5


View Profile WWW
March 02, 2018, 02:11:30 PM
 #3

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.
achow101
Staff
Legendary
*
Offline Offline

Activity: 3430
Merit: 6704


Just writing some code


View Profile WWW
March 02, 2018, 03:31:31 PM
 #4

What exactly are the lines you changed (as in post the code snippets for your changes).

wsxdrfv (OP)
Jr. Member
*
Offline Offline

Activity: 405
Merit: 5


View Profile WWW
March 02, 2018, 03:50:23 PM
 #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<unsigned char>(1,33);
base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,33);
base58Prefixes[SCRIPT_ADDRESS2] = std::vector<unsigned char>(1,33);
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!