Post
Topic
Board Bitcoin Technical Support
Re: wallet.dat backup
by
achow101
on 01/12/2017, 21:42:32 UTC
Thank you. If I generated a witnessaddress and do not know the public key used to generate it, how do I spend funds that are on witnessaddress if I move wallet.dat to another core?
The private and public keys are stored in your wallet. The software will allow you to spend from the witness address.

Also, will my wallet.dat hold the private keys of all my regular addresses? Even if I used the wallet.dat to generate let's say 5, 10 or 25 thousand regular addresses?
Yes. It always does. Keys are never removed from the wallet.dat file unless it is corrupted.

And I suppose that if I have the public and private key of a regular address, I can always regenerate the segwit address and spend all funds that are on that specific segwit address, right? Will the "bitcoin-cli addwitnessaddress 1myregularaddress..." command always generate the same segwit address?
Yes.