Rename Accounts-V2 to Accounts (#7545)

* rename accounts v2

* rename keymanager and fix imports

* rename accounts-v2 instances

* imports

* build

* build fix

* deepsource

* fix up broken aliases

* imports

* gaz

* Update validator/accounts/accounts_import_test.go

Co-authored-by: Ivan Martinez <ivanthegreatdev@gmail.com>

* fmt

Co-authored-by: Ivan Martinez <ivanthegreatdev@gmail.com>
This commit is contained in:
Raul Jordan
2020-10-15 17:31:52 -05:00
committed by GitHub
parent 7aaefd123e
commit a81c863ddb
86 changed files with 532 additions and 546 deletions

View File

@@ -11,7 +11,7 @@ go_library(
"//shared/fileutil:go_default_library",
"//shared/params:go_default_library",
"//shared/promptutil:go_default_library",
"//validator/keymanager/v2:go_default_library",
"//validator/keymanager:go_default_library",
"@com_github_google_uuid//:go_default_library",
"@com_github_logrusorgru_aurora//:go_default_library",
"@com_github_pkg_errors//:go_default_library",
@@ -36,7 +36,7 @@ go_test(
"//shared/testutil:go_default_library",
"//shared/testutil/assert:go_default_library",
"//shared/testutil/require:go_default_library",
"//validator/keymanager/v2:go_default_library",
"//validator/keymanager:go_default_library",
"@com_github_google_uuid//:go_default_library",
"@com_github_urfave_cli_v2//:go_default_library",
"@com_github_wealdtech_go_eth2_wallet_encryptor_keystorev4//:go_default_library",

View File

@@ -21,7 +21,7 @@ import (
"github.com/prysmaticlabs/prysm/shared/fileutil"
"github.com/prysmaticlabs/prysm/shared/params"
"github.com/prysmaticlabs/prysm/shared/promptutil"
v2keymanager "github.com/prysmaticlabs/prysm/validator/keymanager/v2"
"github.com/prysmaticlabs/prysm/validator/keymanager"
"github.com/urfave/cli/v2"
keystorev4 "github.com/wealdtech/go-eth2-wallet-encryptor-keystorev4"
)
@@ -198,7 +198,7 @@ func encrypt(cliCtx *cli.Context) error {
if err != nil {
return errors.Wrap(err, "could not encrypt into new keystore")
}
item := &v2keymanager.Keystore{
item := &keymanager.Keystore{
Crypto: cryptoFields,
ID: id.String(),
Version: encryptor.Version(),
@@ -230,7 +230,7 @@ func readAndDecryptKeystore(fullPath, password string) error {
return errors.Wrapf(err, "could not read file at path: %s", fullPath)
}
decryptor := keystorev4.New()
keystoreFile := &v2keymanager.Keystore{}
keystoreFile := &keymanager.Keystore{}
if err := json.Unmarshal(file, keystoreFile); err != nil {
return errors.Wrap(err, "could not JSON unmarshal keystore file")

View File

@@ -18,7 +18,7 @@ import (
"github.com/prysmaticlabs/prysm/shared/testutil"
"github.com/prysmaticlabs/prysm/shared/testutil/assert"
"github.com/prysmaticlabs/prysm/shared/testutil/require"
v2keymanager "github.com/prysmaticlabs/prysm/validator/keymanager/v2"
"github.com/prysmaticlabs/prysm/validator/keymanager"
"github.com/urfave/cli/v2"
keystorev4 "github.com/wealdtech/go-eth2-wallet-encryptor-keystorev4"
)
@@ -47,7 +47,7 @@ func setupCliContext(
return cli.NewContext(&app, set, nil)
}
func createRandomKeystore(t testing.TB, password string) (*v2keymanager.Keystore, bls.SecretKey) {
func createRandomKeystore(t testing.TB, password string) (*keymanager.Keystore, bls.SecretKey) {
encryptor := keystorev4.New()
id, err := uuid.NewRandom()
require.NoError(t, err)
@@ -55,7 +55,7 @@ func createRandomKeystore(t testing.TB, password string) (*v2keymanager.Keystore
pubKey := validatingKey.PublicKey().Marshal()
cryptoFields, err := encryptor.Encrypt(validatingKey.Marshal(), password)
require.NoError(t, err)
return &v2keymanager.Keystore{
return &keymanager.Keystore{
Crypto: cryptoFields,
Pubkey: fmt.Sprintf("%x", pubKey),
ID: id.String(),