From 709150f5e74c0b5919244316de8dbc4a6a37beaa Mon Sep 17 00:00:00 2001 From: Shawn <44221603+shaspitz@users.noreply.github.com> Date: Mon, 8 Jul 2024 15:17:39 -0700 Subject: [PATCH] feat: logging --- p2p/integrationtest/provider/client.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/p2p/integrationtest/provider/client.go b/p2p/integrationtest/provider/client.go index c694c3a48..3740b324a 100644 --- a/p2p/integrationtest/provider/client.go +++ b/p2p/integrationtest/provider/client.go @@ -8,6 +8,7 @@ import ( "errors" "log/slog" "math/big" + "strings" "time" providerapiv1 "github.com/primev/mev-commit/p2p/gen/go/providerapi/v1" @@ -123,6 +124,12 @@ func (b *ProviderClient) CheckAndStake() error { BlsPublicKey: hex.EncodeToString(blsPubkeyBytes), }) if err != nil { + if strings.Contains(err.Error(), "Invalid BLS public key length") { + b.logger.Error("failed to register stake", "err", err) + b.logger.Info("blsPubkeyBytes", "blsPubkeyBytes", hex.EncodeToString(blsPubkeyBytes)) + b.logger.Info("blsPubkeyBytes length", "blsPubkeyBytes length", len(blsPubkeyBytes)) + return err + } b.logger.Error("failed to register stake", "err", err) return err }