pkt-cash / pktd

The PKT full node and wallet
https://pkt.cash/
ISC License
39 stars 26 forks source link

Recover address after corrupted wallet.db file #365

Closed milnomada closed 1 year ago

milnomada commented 2 years ago

Hello,

I got corrupted the wallet.db file of my wallet. No way to recover it. I'm using pktwallet version 1.4.0

Instead, I re run the pktwallet --create command. Entered the passphrase on Enter the private passphrase for your new wallet:

then I answered yes at: Do you have an existing wallet seed you want to use? (n/no/y/yes) [no]: yes

Entered the wallet phrase at: Enter existing wallet seed:

Decrypting your seed... Creating the wallet... 1649873981 [INF] wallet.go:3254 Opened wallet The wallet has been created successfully.

Then I run the pktwallet command.

1649873989 [INF] pktwallet.go:67 Version 1.4.0 1649873989 [INF] server.go:200 Listening on 127.0.0.1:64763 1649873989 [INF] server.go:200 Listening on [::1]:64763 1649873990 [INF] wallet.go:3254 Opened wallet 1649874040 [INF] wallet.go:399 Waiting for chain backend to sync to tip

1649874040 [INF] seed.go:58 1 addresses found from DNS seed seed.anode.co 1649874040 [INF] seed.go:58 20 addresses found from DNS seed seed.cjd.li 1649874040 [INF] wallet.go:403 Chain backend synced to tip! 👍

1649874040 [INF] seed.go:58 20 addresses found from DNS seed pktdseed.pkt.world

But when I run the pktctl --wallet getaddressbalances command, I get:

[]

The miners I have, seem to be still generating at my old pkt address without problems. Any suggerence to get the pktctl command to run or to recover the address I have in use for the pktctl command?

Thanks for any comment/suggerence :neutral_face:

UCIS commented 2 years ago

After restoring the wallet from an existing seed, you have to run the pktctl --wallet getnewaddress command once for each address you originally had. This will create the previous addresses again in the same order. After that you may need to use the pktctl --wallet resync command and wait for a while until the wallet has recovered the full balance.