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

user63569: 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.

80233: <p>how does bitcoin core generate addresses and where can they be found in the data directory?</p>
 63569: <p>Bitcoin addresses can be created anywhere with any programming language.
they're just like the result of 1 + 1 = 2.</p>

<p>if you are looking for the function they're using for getting a new address here you go:
<a href="https://github.com/bitcoin/bitcoin/blob/4ad3b3c72c73d61e0a0cab541dca20acf651320d/src/wallet/rpcwallet.cpp#L135" rel="nofollow noreferrer">https://github.com/bitcoin/bitcoin/blob/4ad3b3c72c73d61e0a0cab541dca20acf651320d/src/wallet/rpcwallet.cpp#L135</a></p>

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