Skip to content
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

rpcserver: fix SignCompact #2213

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions rpcserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -3595,14 +3595,7 @@
wire.WriteVarString(&buf, 0, c.Message)
messageHash := chainhash.DoubleHashB(buf.Bytes())

sig, err := ecdsa.SignCompact(wif.PrivKey,
messageHash, wif.CompressPubKey)
if err != nil {
return nil, &btcjson.RPCError{
Code: btcjson.ErrRPCInvalidAddressOrKey,
Message: "Sign failed",
}
}
sig := ecdsa.SignCompact(wif.PrivKey, messageHash, wif.CompressPubKey)

Check failure on line 3598 in rpcserver.go

View workflow job for this annotation

GitHub Actions / Build

assignment mismatch: 1 variable but "github.com/btcsuite/btcd/btcec/v2/ecdsa".SignCompact returns 2 values

Check failure on line 3598 in rpcserver.go

View workflow job for this annotation

GitHub Actions / Unit race

assignment mismatch: 1 variable but "github.com/btcsuite/btcd/btcec/v2/ecdsa".SignCompact returns 2 values

return base64.StdEncoding.EncodeToString(sig), nil
}
Expand Down
Loading