Permalink
Browse files

Update Base58

Addresses start with C
  • Loading branch information...
HowToCloneAnAltcoin
HowToCloneAnAltcoin committed Nov 6, 2014
1 parent 7f149b0 commit d0621b86a358e93495658d564640144458aab8ee
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/base58.h
View
@@ -272,7 +272,7 @@ class CBitcoinAddress : public CBase58Data
public:
enum
{
PUBKEY_ADDRESS = 48, // Clonecoin addresses start with L
PUBKEY_ADDRESS = 28, // Clonecoin addresses start with L
SCRIPT_ADDRESS = 5,
PUBKEY_ADDRESS_TEST = 111,
SCRIPT_ADDRESS_TEST = 196,

5 comments on commit d0621b8

@vonba

This comment has been minimized.

Show comment
Hide comment
@vonba

vonba Oct 31, 2017

This doesn't seem to match the version of base58.h I just checked out from the Litecoin repo. Any idea why? The closest I can find is in chainparams.h:


public:
    enum Base58Type {
        PUBKEY_ADDRESS,
        SCRIPT_ADDRESS,
        SCRIPT_ADDRESS2,
        SECRET_KEY,
        EXT_PUBLIC_KEY,
        EXT_SECRET_KEY,

        MAX_BASE58_TYPES
    };

vonba replied Oct 31, 2017

This doesn't seem to match the version of base58.h I just checked out from the Litecoin repo. Any idea why? The closest I can find is in chainparams.h:


public:
    enum Base58Type {
        PUBKEY_ADDRESS,
        SCRIPT_ADDRESS,
        SCRIPT_ADDRESS2,
        SECRET_KEY,
        EXT_PUBLIC_KEY,
        EXT_SECRET_KEY,

        MAX_BASE58_TYPES
    };
@kokokus

This comment has been minimized.

Show comment
Hide comment
@kokokus

kokokus Nov 23, 2017

src/base58.h in version 8.4.0 please define chainparams.h in litecoin repo pubkey_address, (Desired address prefix "f" then your CRYPTONOTE_PUBLIC_ADDRESS_BASE58_PREFIX "0xe9"

kokokus replied Nov 23, 2017

src/base58.h in version 8.4.0 please define chainparams.h in litecoin repo pubkey_address, (Desired address prefix "f" then your CRYPTONOTE_PUBLIC_ADDRESS_BASE58_PREFIX "0xe9"

@kokokus

This comment has been minimized.

Show comment
Hide comment
@kokokus

kokokus Nov 23, 2017

sorry for version the version is Litecoin v0.8.7.4

kokokus replied Nov 23, 2017

sorry for version the version is Litecoin v0.8.7.4

@msohaib47

This comment has been minimized.

Show comment
Hide comment
@msohaib47

msohaib47 Dec 21, 2017

make the change in chainparams.cpp at line 133

    base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,48); 

change 48 to your desired value.

See below for possible values
https://en.bitcoin.it/wiki/Base58Check_encoding

msohaib47 replied Dec 21, 2017

make the change in chainparams.cpp at line 133

    base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,48); 

change 48 to your desired value.

See below for possible values
https://en.bitcoin.it/wiki/Base58Check_encoding

@brackmayhall

This comment has been minimized.

Show comment
Hide comment
@brackmayhall

brackmayhall Jan 14, 2018

Do changes need to be made in decodescript.py? Note the 48 here.

        # some more full transaction tests of varying specific scriptSigs. used instead of
        # tests in decodescript_script_sig because the decodescript RPC is specifically
        # for working on scriptPubKeys (argh!).
        push_signature = bytes_to_hex_str(txSave.vin[0].scriptSig)[2:(0x48*2+4)]
        signature = push_signature[2:]
        der_signature = signature[:-2]
        signature_sighash_decoded = der_signature + '[ALL]'
        signature_2 = der_signature + '82'
        push_signature_2 = '48' + signature_2
        signature_2_sighash_decoded = der_signature + '[NONE|ANYONECANPAY]'

brackmayhall replied Jan 14, 2018

Do changes need to be made in decodescript.py? Note the 48 here.

        # some more full transaction tests of varying specific scriptSigs. used instead of
        # tests in decodescript_script_sig because the decodescript RPC is specifically
        # for working on scriptPubKeys (argh!).
        push_signature = bytes_to_hex_str(txSave.vin[0].scriptSig)[2:(0x48*2+4)]
        signature = push_signature[2:]
        der_signature = signature[:-2]
        signature_sighash_decoded = der_signature + '[ALL]'
        signature_2 = der_signature + '82'
        push_signature_2 = '48' + signature_2
        signature_2_sighash_decoded = der_signature + '[NONE|ANYONECANPAY]'
Please sign in to comment.