From abfa0e60c4dfdb3910ae84b90beb6dfa0b52ac84 Mon Sep 17 00:00:00 2001 From: ozpool Date: Fri, 19 Jun 2026 12:41:51 +0530 Subject: [PATCH] cmd/devp2p/ethtest: fix swapped args in private-key error message The error "unable to read private key for %s: %v" passed (err, addr), so it printed the decode error where the account address belongs and the address where the error belongs. Swap to (addr, err) so the message names the account that failed and then the reason. --- cmd/devp2p/internal/ethtest/chain.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/devp2p/internal/ethtest/chain.go b/cmd/devp2p/internal/ethtest/chain.go index b44e6aa36a..36c395cdef 100644 --- a/cmd/devp2p/internal/ethtest/chain.go +++ b/cmd/devp2p/internal/ethtest/chain.go @@ -335,7 +335,7 @@ func readAccounts(file string) (map[common.Address]*senderInfo, error) { for addr, acc := range keys { pk, err := crypto.HexToECDSA(common.Bytes2Hex(acc.Key)) if err != nil { - return nil, fmt.Errorf("unable to read private key for %s: %v", err, addr) + return nil, fmt.Errorf("unable to read private key for %s: %v", addr, err) } accounts[addr] = &senderInfo{Key: pk, Nonce: 0} }