Skip to content

Commit

Permalink
WIP: proof: remove record too large from GroupKeyRevealDecoder
Browse files Browse the repository at this point in the history
  • Loading branch information
ffranr committed Dec 5, 2024
1 parent 3d3b254 commit e4bcdba
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions proof/encoding.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package proof

import (
"bytes"
"crypto/sha256"
"fmt"
"io"
"math"
Expand Down Expand Up @@ -480,10 +479,6 @@ func GroupKeyRevealEncoder(w io.Writer, val any, buf *[8]byte) error {
}

func GroupKeyRevealDecoder(r io.Reader, val any, buf *[8]byte, l uint64) error {
if l > btcec.PubKeyBytesLenCompressed+sha256.Size {
return tlv.ErrRecordTooLarge
}

if l < btcec.PubKeyBytesLenCompressed {
return fmt.Errorf("%w: group key reveal too short",
ErrProofInvalid)
Expand Down

0 comments on commit e4bcdba

Please sign in to comment.