Skip to content

Commit

Permalink
Hotfix input deserialization check on taproot signature (#226)
Browse files Browse the repository at this point in the history
  • Loading branch information
louisinger authored Jan 15, 2024
1 parent d677ab6 commit c2d1a3e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions psetv2/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -1195,7 +1195,7 @@ func (i *Input) deserialize(buf *bytes.Buffer) error {
if len(i.TapKeySig) > 0 {
return ErrInDuplicatedField("taproot key signature")
}
if len(kp.Value) != 64 || len(kp.Value) != 65 {
if len(kp.Value) != 64 && len(kp.Value) != 65 {
return ErrInInvalidTapKeySig
}
i.TapKeySig = kp.Value
Expand All @@ -1213,7 +1213,7 @@ func (i *Input) deserialize(buf *bytes.Buffer) error {
return ErrInDuplicatedField("taproot script signature")
}
}
if len(kp.Value) != 64 || len(kp.Value) != 65 {
if len(kp.Value) != 64 && len(kp.Value) != 65 {
return ErrInInvalidTapScriptSigSignature
}
i.TapScriptSig = append(i.TapScriptSig, TapScriptSig{
Expand Down

0 comments on commit c2d1a3e

Please sign in to comment.