-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make the signer constructor return an error if it fails #1190
Conversation
Signed-off-by: litt3 <[email protected]>
Signed-off-by: litt3 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM after you change the %v to %w (those have different semantics)
core/auth/v2/signer.go
Outdated
privateKeyBytes := common.FromHex(privateKeyHex) | ||
privateKey, err := crypto.ToECDSA(privateKeyBytes) | ||
if err != nil { | ||
log.Fatalf("Failed to parse private key: %v", err) | ||
return nil, fmt.Errorf("create ECDSA private key: %v", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return nil, fmt.Errorf("create ECDSA private key: %v", err) | |
return nil, fmt.Errorf("create ECDSA private key: %w", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gah, once again! Fixed fc4e34ebc
api/clients/v2/payload_disperser.go
Outdated
return nil, fmt.Errorf("invalid length for signer private key") | ||
signer, err := auth.NewLocalBlobRequestSigner(payloadDispCfg.SignerPaymentKey) | ||
if err != nil { | ||
return nil, fmt.Errorf("new local blob request signer: %v", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return nil, fmt.Errorf("new local blob request signer: %v", err) | |
return nil, fmt.Errorf("new local blob request signer: %w", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Signed-off-by: litt3 <[email protected]>
Why are these changes needed?
Checks