Improve wording of error message

This commit is contained in:
Adam Schmideg 2020-03-03 10:38:54 +01:00
parent ae3c77b82b
commit a66d88ea2c
2 changed files with 2 additions and 2 deletions

View file

@ -128,7 +128,7 @@ func TestAccountImportTooShort(t *testing.T) {
geth := runGeth(t, "account", "import", keyfile) geth := runGeth(t, "account", "import", keyfile)
defer geth.ExpectExit() defer geth.ExpectExit()
geth.Expect(` 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
`) `)
} }

View file

@ -171,7 +171,7 @@ func LoadECDSA(file string) (*ecdsa.PrivateKey, error) {
} }
size := stat.Size() size := stat.Size()
if size != 64 { 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) buf, err := ioutil.ReadFile(file)
if err != nil { if err != nil {