mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 15:37:56 -05:00
Accounts V2: improve progressbar feedback (#6814)
* Accounts V2: improve progressbar feedback * gofmt * Merge refs/heads/master into pb-improvements
This commit is contained in:
@@ -505,6 +505,8 @@ func (w *Wallet) enterPasswordForAllAccounts(cliCtx *cli.Context, accountNames [
|
||||
BarStart: "[",
|
||||
BarEnd: "]",
|
||||
}),
|
||||
progressbar.OptionOnCompletion(func() { fmt.Println() }),
|
||||
progressbar.OptionSetDescription("Importing accounts"),
|
||||
)
|
||||
ctx := context.Background()
|
||||
for i := 0; i < len(accountNames); i++ {
|
||||
|
||||
@@ -303,7 +303,6 @@ func (dr *Keymanager) initializeSecretKeysCache(ctx context.Context) error {
|
||||
if len(accountNames) == 0 {
|
||||
return nil
|
||||
}
|
||||
log.Info("Decrypting validator accounts...")
|
||||
// We initialize a nice progress bar to offer the user feedback
|
||||
// during this slow operation.
|
||||
bar := initializeProgressBar(len(accountNames))
|
||||
@@ -422,6 +421,8 @@ func initializeProgressBar(numItems int) *progressbar.ProgressBar {
|
||||
BarStart: "[",
|
||||
BarEnd: "]",
|
||||
}),
|
||||
progressbar.OptionOnCompletion(func() { fmt.Println() }),
|
||||
progressbar.OptionSetDescription("Loading validator accounts"),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user