mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-06 05:37:50 +02:00
refactor: share and use GenerateRandomKey helper
Making the `GenerateRandomKey` helper available to other modules via
key.{h.cpp} allows us to create random private keys directly at
instantiation of CKey, in contrast to the two-step process of creating
the instance and then having to call `MakeNewKey(...)`.
This commit is contained in:
@@ -11,9 +11,7 @@ static void EllSwiftCreate(benchmark::Bench& bench)
|
||||
{
|
||||
ECC_Start();
|
||||
|
||||
CKey key;
|
||||
key.MakeNewKey(true);
|
||||
|
||||
CKey key = GenerateRandomKey();
|
||||
uint256 entropy = GetRandHash();
|
||||
|
||||
bench.batch(1).unit("pubkey").run([&] {
|
||||
|
||||
Reference in New Issue
Block a user