Bitcoin Forum
May 05, 2024, 08:46:23 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Problem with Importing a private key  (Read 304 times)
Fakhoury (OP)
Legendary
*
Offline Offline

Activity: 1386
Merit: 1027


Permabull Bitcoin Investor


View Profile
August 07, 2018, 02:41:55 AM
 #1

Hello,

Now I think I made a silly but yet, expensive, mistake while importing a private key.

It's regarding the BCX fork where their clients are Qt clients like the ones of Bitcoin Core.

At first the wallet was scanning the key (was still at 1%) and then I forced close it via the task manager as I wanted to see the balance being updated in real time as the debug window was covering the main wallet window.

Now when I import the key again, it gives me 'null'.

What made me sure there is something wrong is that the fork took place the at the block height 498888 and I had funds in BTC which I then moved to another wallet at block height 502226.

So I want to somehow like 'roll-back' what I did and to let the wallet re-scan the private key again.

Thanks in advance for your help.

Sincerely yours,
Fak

Quote from:  Satoshi Nakamoto
Feb. 14, 2010: I’m sure that in 20 years there will either be very large transaction volume or no volume.
1714941983
Hero Member
*
Offline Offline

Posts: 1714941983

View Profile Personal Message (Offline)

Ignore
1714941983
Reply with quote  #2

1714941983
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.
1714941983
Hero Member
*
Offline Offline

Posts: 1714941983

View Profile Personal Message (Offline)

Ignore
1714941983
Reply with quote  #2

1714941983
Report to moderator
Thirdspace
Hero Member
*****
Offline Offline

Activity: 1232
Merit: 738


Mixing reinvented for your privacy | chipmixer.com


View Profile
August 07, 2018, 08:07:01 AM
 #2

Now when I import the key again, it gives me 'null'.
when importing private key, it returns null on success

So I want to somehow like 'roll-back' what I did and to let the wallet re-scan the private key again.
you can do importprivkey "yourprivatekey" "" true
second parameter is empty string to assign address to default account
third parameter is true to rescan local blockchain, but if the address already exist in the wallet this won't work
so in your case, you can do that only by restarting wallet with -rescan command-line argument

Fakhoury (OP)
Legendary
*
Offline Offline

Activity: 1386
Merit: 1027


Permabull Bitcoin Investor


View Profile
August 07, 2018, 10:09:37 PM
 #3

Now when I import the key again, it gives me 'null'.
when importing private key, it returns null on success

So I want to somehow like 'roll-back' what I did and to let the wallet re-scan the private key again.
you can do importprivkey "yourprivatekey" "" true
second parameter is empty string to assign address to default account
third parameter is true to rescan local blockchain, but if the address already exist in the wallet this won't work
so in your case, you can do that only by restarting wallet with -rescan command-line argument

Much appreciated Thirdspace, thank you.

Foruntatly, I had a backup of the VM where the fork blockchain and client were laying there, so I worked on the backup and everything is solved now.

Again, thank you so much Smiley

Quote from:  Satoshi Nakamoto
Feb. 14, 2010: I’m sure that in 20 years there will either be very large transaction volume or no volume.
boulderchain
Jr. Member
*
Offline Offline

Activity: 59
Merit: 5


View Profile
August 09, 2018, 06:33:43 AM
 #4

I'm glad that you fixed it.

In addition to Thirdspace's answer: You can also trigger the rescan from the console, which is my preferred way because you don't have to restart your wallet.

★ PRiVCY ➢ Own Your Privacy! ➢ Best privacy crypto-market! ★
✈✈✈[PoW/PoS]✅[Tor]✅[Airdrop]✈✈✈ (https://privcy.io/)
ranochigo
Legendary
*
Offline Offline

Activity: 2954
Merit: 4166


View Profile
August 12, 2018, 03:05:13 AM
 #5

So basically you need to sync to the point in unix time where the public key was generated in order to retrieve your private key for that particular address or do we get one private key per wallet (wallet.dat) because I am thinking if we do then it does not matter if the wallet is synced or not we will still be able to retrieve our private keys using the command line
You don't need to synchronize your wallet to be able to import your private key. Your private key is simply the private part of your ECDSA key pair and it is not generated based on your unix time, else collisions would be common. You can generate as many addresses as you'd like in a wallet and each address has a corresponding private key stored by your wallet.

Bitcoin Core and some other wallet uses BIP38 and the addresses are generated as children from the master key.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
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!