Skip to content

Commit

Permalink
Update bob.go
Browse files Browse the repository at this point in the history
Fixed length check on B output
  • Loading branch information
icellan committed Nov 4, 2022
1 parent 0d1e79a commit 51281dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bob.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func NewFromTapes(tapes []bob.Tape) (b *B, err error) {

// FromTape takes a BOB Tape and returns a B data structure
func (b *B) FromTape(tape bob.Tape) (err error) {
if len(tape.Cell) < 4 {
if len(tape.Cell) < 3 { // B only requires 3 elements at minimum
err = fmt.Errorf("invalid B tx Only %d pushdatas", len(tape.Cell))
return
}
Expand Down

0 comments on commit 51281dc

Please sign in to comment.