Commit c8f53122 authored by Piotr Batko's avatar Piotr Batko Committed by Bartek Wrona
Browse files

Use PrivateKey and PublicKey in Account to generate keys in lazy way

There is use case, where immediate key generation cause problems, because in
this case, key generator executable is not provided. Module with tests is run
in two environments (testnet and mainnet) and in mainnet case, key generator
is not provided. Account object is created in global variable and is used only
in testnet case, but global variables are evaluated also in mainnet case, what
caused problem.

To solve this problem, account object should be generated independently from
presence of key generator executable. This commit moves key generation to
moment, when keys are really needed.

Implementations details:
`with_keys` initializer parameter is not needed anymore, because it's purpose
was to prevent keys generation in initializer. Now, when keys aren't generated
there anyway, parameter was removed.
parent d2005d7d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment