From a8525749a8988fdee7e9a79cceb97f2bb4476349 Mon Sep 17 00:00:00 2001 From: marcello33 Date: Wed, 13 Mar 2024 18:34:28 +0100 Subject: [PATCH] chg: better comment on panic --- crypto/keys/secp256k1/secp256k1.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/keys/secp256k1/secp256k1.go b/crypto/keys/secp256k1/secp256k1.go index 204aba5f930f..0b0dd8b1667c 100644 --- a/crypto/keys/secp256k1/secp256k1.go +++ b/crypto/keys/secp256k1/secp256k1.go @@ -218,7 +218,7 @@ const PubKeySize = 65 // Address returns an Ethereum style addresses func (pubKey *PubKey) Address() crypto.Address { if len(pubKey.Key) != PubKeySize { - panic("length of pubkey is incorrect") + panic(fmt.Sprintf("length of pubkey is incorrect %d != %d", len(pubKey.Key), PubKeySize)) } return crypto.Address(ethCrypto.Keccak256(pubKey.Key[1:])[12:])