Skip to content

Commit

Permalink
fix testmode
Browse files Browse the repository at this point in the history
  • Loading branch information
shrimalmadhur committed Dec 19, 2024
1 parent 1ce935b commit 6bf5c84
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"encoding/json"
"errors"
"fmt"

"io"
"maps"
"math"
Expand Down Expand Up @@ -581,6 +580,11 @@ func (n *Node) ProcessBatch(ctx context.Context, header *core.BatchHeader, blobs
}

func (n *Node) SignMessage(ctx context.Context, data [32]byte) (*core.Signature, error) {
// This usecase is only used for testing purposes.
if n.Config.PrivateBls != "" {
return n.KeyPair.SignMessage(data), nil
}

signature, err := n.BlsSigner.Sign(ctx, data[:])
if err != nil {
return nil, fmt.Errorf("failed to sign message: %w", err)
Expand Down

0 comments on commit 6bf5c84

Please sign in to comment.