Hi I'm student studying bitcoin-core. I tested bitcoin regtest mode, and I want to know when CKey::MakeNewKey() is called.
when I do this,
bitcoin-cli -regtest createwallet "wallet1"
MakeNewKey() function was called, but
bitcoin-cli -regtest getnewaddress or bitcoin-cli -regtest -generate 1
didn't call MakeNewKey() and only call GetPrivKey() and GetPubKey() in key.cpp
and when GetPrivKey() was called, the part of key32 in serialized key doesn't match of wallet's private key
My questions are,
- Is only one private key of my wallet?
- Blocks have their own private keys?
- If #2 is right, what file make private key and public key of the block