Bitcoin Forum
May 06, 2024, 12:02:27 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Altcoin branch of Litecoin 16.3 creates new addresses but has no private key  (Read 97 times)
number435398 (OP)
Jr. Member
*
Offline Offline

Activity: 260
Merit: 6


View Profile
October 08, 2018, 10:09:22 PM
 #1

Branching off litecoin 16.3 I compiled a wallet that seems to work fine until I tell it to make a "new" address.  It appears to creates one.  Then I go to the console and type "dumpprivkey <address>" and it responds with "Private key for address <address> is not known".  It also doesn't track any of the transactions for the addresses its claims to create.  If I have the wallet open an existing wallet.dat file, it works fine with existing addresses.  If, even with an existing wallet.dat file I tell it to generate a new address, it doesn't know the private key for that address via "dumpprivkey".  However, "dumpprivkey" does work for the existing addresses in the wallet.dat file.  I don't recall changing any code relevant to this behaviour.  Anyone have any ideas or what I could look at to try and resolve this?
1714953747
Hero Member
*
Offline Offline

Posts: 1714953747

View Profile Personal Message (Offline)

Ignore
1714953747
Reply with quote  #2

1714953747
Report to moderator
1714953747
Hero Member
*
Offline Offline

Posts: 1714953747

View Profile Personal Message (Offline)

Ignore
1714953747
Reply with quote  #2

1714953747
Report to moderator
Unlike traditional banking where clients have only a few account numbers, with Bitcoin people can create an unlimited number of accounts (addresses). This can be used to easily track payments, and it improves anonymity.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714953747
Hero Member
*
Offline Offline

Posts: 1714953747

View Profile Personal Message (Offline)

Ignore
1714953747
Reply with quote  #2

1714953747
Report to moderator
Heisenberg_Hunter
Legendary
*
Offline Offline

Activity: 1583
Merit: 1276


Heisenberg Design Services


View Profile WWW
October 10, 2018, 07:54:53 PM
 #2

  Then I go to the console and type "dumpprivkey <address>" and it responds with "Private key for address <address> is not known".
The function is returned as "private key not found" only when you type the dumpprivkey in console while the wallet is locked. You need to unlock your qt wallet before typing the dumpprivkey in the console. You can unlock your wallet by typing

Code:
walletpassphrase "passphrase" [unlock time in sec]

Once after this function has been executed, you can proceed with dumpprivkey [address] which will give you the private key of the address. 

Note that regarding tracking of transactions, consider my previous reply on your earlier thread to use the --rescan function.
number435398 (OP)
Jr. Member
*
Offline Offline

Activity: 260
Merit: 6


View Profile
October 10, 2018, 08:52:37 PM
 #3

The wallet isn't locked.  Rescan doesn't produce the desired result.

This situation can also be recreated by changing a single line of code in the Litecoin v 16.3:

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

If that is changed to, say, "(1,50)" this problem exists there as well.  All it's supposed to do is impact how the public keys are displayed; what number or letter they are preceded by.  Yet, for some reason, changing it results in this other misbehaviour.
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!