From a66d88ea2c6aeac6df052d11b9eb39cf8dc6a235 Mon Sep 17 00:00:00 2001 From: Adam Schmideg Date: Tue, 3 Mar 2020 10:38:54 +0100 Subject: [PATCH] Improve wording of error message --- cmd/geth/accountcmd_test.go | 2 +- crypto/crypto.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/geth/accountcmd_test.go b/cmd/geth/accountcmd_test.go index b3b9cb91a8..dd40346728 100644 --- a/cmd/geth/accountcmd_test.go +++ b/cmd/geth/accountcmd_test.go @@ -128,7 +128,7 @@ func TestAccountImportTooShort(t *testing.T) { geth := runGeth(t, "account", "import", keyfile) defer geth.ExpectExit() geth.Expect(` -Fatal: Failed to load the private key: expected 64 hexa characters, got 40 +Fatal: Failed to load the private key: expected 64 bytes, got 40 `) } diff --git a/crypto/crypto.go b/crypto/crypto.go index 1d0501709f..de5b9b0712 100644 --- a/crypto/crypto.go +++ b/crypto/crypto.go @@ -171,7 +171,7 @@ func LoadECDSA(file string) (*ecdsa.PrivateKey, error) { } size := stat.Size() if size != 64 { - return nil, fmt.Errorf("expected 64 hexa characters, got %v", size) + return nil, fmt.Errorf("expected 64 bytes, got %v", size) } buf, err := ioutil.ReadFile(file) if err != nil {