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:
1 parent
4b1196a985
commit
fa1d49542e
16 files changed
+63
-100
No files matched your search
@@ -85,8 +85,7 @@ void TestAddAddressesToSendBook(interfaces::Node& node)
|
||||
}
|
||||
|
||||
auto build_address = [&wallet]() {
|
||||
CKey key;
|
||||
key.MakeNewKey(true);
|
||||
CKey key = GenerateRandomKey();
|
||||
CTxDestination dest(GetDestinationForKey(
|
||||
key.GetPubKey(), wallet->m_default_address_type));
|
||||
|
||||
|
||||
Reference in new issue
Block a user