Skip to content

Commit

Permalink
[Go] add overlooked valid return value for unchecked deserialization
Browse files Browse the repository at this point in the history
  • Loading branch information
Vindaar committed Jul 2, 2024
1 parent c94c278 commit 3799d9a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions constantine-go/constantine.go
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ func DeserializePubKeyCompressedUnchecked(src Bytes48) (pub EthBlsPubKey, err er
status := C.ctt_eth_bls_deserialize_pubkey_compressed_unchecked((*C.ctt_eth_bls_pubkey)(&pub),
(*C.byte)(&src[0]),
)
if status != C.cttCodecEcc_Success {
if status != C.cttCodecEcc_Success && status != C.cttCodecEcc_PointAtInfinity {
err := errors.New(
C.GoString(C.ctt_codec_ecc_status_to_string(status)),
)
Expand All @@ -479,7 +479,7 @@ func DeserializeSignatureCompressedUnchecked(src Bytes96) (sig EthBlsSignature,
status := C.ctt_eth_bls_deserialize_signature_compressed_unchecked((*C.ctt_eth_bls_signature)(&sig),
(*C.byte)(&src[0]),
)
if status != C.cttCodecEcc_Success {
if status != C.cttCodecEcc_Success && status != C.cttCodecEcc_PointAtInfinity {
err := errors.New(
C.GoString(C.ctt_codec_ecc_status_to_string(status)),
)
Expand Down

0 comments on commit 3799d9a

Please sign in to comment.