validate opts: custom trace number for batch
@@ -1216,9 +1216,11 @@ func (f *File) isSequenceAscending() error {
lastSeq := 0
for _, batch := range f.Batches {
current := batch.GetHeader().BatchNumber
+ if f.validateOpts == nil || !f.validateOpts.CustomTraceNumbers {
if current <= lastSeq {
return NewErrFileBatchNumberAscending(lastSeq, current)
}
+ }
lastSeq = current
}
