Post
Topic
Board Announcements (Altcoins)
Merits 3 from 1 user
Re: [ANN][GAP] Gapcoin - Prime Gap Search - New Math Algo - CPU / GPU - Zero Premine
by
gjhiggins
on 27/02/2021, 11:42:14 UTC
⭐ Merited by xandry (3)
new wallet give me error with my old wallet.dat  Huh
Indeed, the 0.16.3 client will not load wallet.dat files created with the 0.9 client because the 0.16.3 client wallets are in HD (Hierarchical Deterministic) key format.

The recommended route is either:

1. Hand-import all your privkeys to the 0.16.3 client by using `importprivkey <label> <rescan>` - providing a label will better help you manage your keys in an HD-enabled wallet and if you have several privkeys to import, use “false” for rescan and afterwards restart the client with the -rescan option on the command line. For ultimate clarity, here is the output for `help importprivkey`:
Code:
./src/gapcoin-cli -datadir=`pwd`/datadir help importprivkey
importprivkey "privkey" ( "label" ) ( rescan )

Adds a private key (as returned by dumpprivkey) to your wallet. Requires a new wallet backup.

Arguments:
1. "privkey"          (string, required) The private key (see dumpprivkey)
2. "label"            (string, optional, default="") An optional label
3. rescan               (boolean, optional, default=true) Rescan the wallet for transactions

Note: This call can take minutes to complete if rescan is true, during that time, other rpc calls
may report that the imported key exists but related transactions are still missing, leading to
temporarily incorrect/bogus balances and unspent outputs until rescan completes.

Examples:

Dump a private key
> gapcoin-cli dumpprivkey "myaddress"

Import the private key with rescan
> gapcoin-cli importprivkey "mykey"

Import using a label and without rescan
> gapcoin-cli importprivkey "mykey" "testing" false

Import using default blank label and without rescan
> gapcoin-cli importprivkey "mykey" "" false

As a JSON-RPC call
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "importprivkey", "params": ["mykey", "testing", false] }' -H 'content-type: text/plain;' http://127.0.0.1:31397/

2. Use dumpwallet and importwallet because the 0.16.3 client can import wallets dumped by the 0.9 client.

Start the 0.9 client and in the debug console, run dumpwallet "/some/path/mydumpedwallet.txt" (You can and should provide an OS-specific pathname). Stop the 0.9 client, start the 0.16.3 client and in the debug console run importwallet "/some/path/mydumpedwallet.txt". Basically it's just a bulk import of privkeys with an automatic rescan.

Cheers

Graham