Skip to content

Commit

Permalink
tests: fix coder tester for TxType bound (#5536)
Browse files Browse the repository at this point in the history
  • Loading branch information
algorandskiy committed Jul 11, 2023
1 parent 924087f commit fa0b354
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions protocol/codec_tester.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,9 @@ func randomizeValue(v reflect.Value, datapath string, tag string, remainingChang
// Don't generate empty strings for serializableError since nil values of *string type
// will serialize differently by msgp and go-codec
len = rand.Int()%63 + 1
} else if strings.HasSuffix(v.Type().PkgPath(), "go-algorand/protocol") && v.Type().Name() == "TxType" {
// protocol.TxType has allocbound defined as a custom msgp:allocbound directive so not supported by reflect
len = rand.Int()%6 + 1
} else if hasAllocBound {
len = 1
} else {
Expand Down

0 comments on commit fa0b354

Please sign in to comment.