mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-08 23:18:15 -05:00
Massive code cleanup (#10913)
* Massive code cleanup * fix test issues * remove GetGenesis mock expectations * unused receiver * rename unused params Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
@@ -223,14 +223,14 @@ func encrypt(cliCtx *cli.Context) error {
|
||||
// Reads the keystore file at the provided path and attempts
|
||||
// to decrypt it with the specified passwords.
|
||||
func readAndDecryptKeystore(fullPath, password string) error {
|
||||
file, err := os.ReadFile(fullPath) // #nosec G304
|
||||
f, err := os.ReadFile(fullPath) // #nosec G304
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "could not read file at path: %s", fullPath)
|
||||
}
|
||||
decryptor := keystorev4.New()
|
||||
keystoreFile := &keymanager.Keystore{}
|
||||
|
||||
if err := json.Unmarshal(file, keystoreFile); err != nil {
|
||||
if err := json.Unmarshal(f, keystoreFile); err != nil {
|
||||
return errors.Wrap(err, "could not JSON unmarshal keystore file")
|
||||
}
|
||||
// We extract the validator signing private key from the keystore
|
||||
|
||||
Reference in New Issue
Block a user