Update validator keygen

This commit is contained in:
Mamy André-Ratsimbazafy 2020-03-04 23:53:32 +01:00 committed by tersec
parent 14bc9e60ca
commit 65d668c3f6
1 changed files with 8 additions and 3 deletions

View File

@ -37,9 +37,14 @@ proc generateDeposits*(totalValidators: int,
debug "Rewriting unreadable deposit", err = err.formatMsg(depositFn)
discard
let
privKey = if randomKeys: ValidatorPrivKey.random
else: makeInteropPrivKey(i)
var
privkey{.noInit.}: ValidatorPrivKey
pubKey{.noInit.}: ValidatorPubKey
if randomKeys:
(pubKey, privKey) = newKeyPair()
else:
privKey = makeInteropPrivKey(i)
pubKey = privKey.pubKey()
let dp = makeDeposit(pubKey, privKey)