Skip to content

Commit

Permalink
feat: logging
Browse files Browse the repository at this point in the history
  • Loading branch information
shaspitz committed Jul 8, 2024
1 parent 15cb5cf commit 709150f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions p2p/integrationtest/provider/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"errors"
"log/slog"
"math/big"
"strings"
"time"

providerapiv1 "github.com/primev/mev-commit/p2p/gen/go/providerapi/v1"
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit 709150f

Please sign in to comment.