Making the GeneratingRandomKey
helper (recently introduced in PR #28433, commit b6934fd03f080d437acb1fd2b665503c3d6de785) available to other modules via key.{h.cpp} allows us to create random private keys directly at CKey instantiation, in contrast to the currently needed two-step process of creating an (invalid) CKey instance first and then having to call MakeNewKey(...)
.
This is mostly used in unit tests and a few instances in the wallet.