how bitcoin core generate addresses?

0

how does bitcoin core generate addresses and where can they be found in the data directory?

Errol

Posted 2018-03-22T07:15:59.867

Reputation: 77

To generate addresses or to save the ones generated? Maybe you are talking about the wallet file itself.Osias Jota 2018-03-22T10:52:21.167

Answers

1

Bitcoin addresses can be created anywhere with any programming language. they're just like the result of 1 + 1 = 2.

if you are looking for the function they're using for getting a new address here you go: https://github.com/bitcoin/bitcoin/blob/4ad3b3c72c73d61e0a0cab541dca20acf651320d/src/wallet/rpcwallet.cpp#L135

When you make RPC call 'getnewaddress' that function will be called, and addresses keys are already generated (keypool) and saved into wallet.dat file.

Adam

Posted 2018-03-22T07:15:59.867

Reputation: 3 215