diff --git a/addbatch.go b/addbatch.go index 475b3db..fcc8a8e 100644 --- a/addbatch.go +++ b/addbatch.go @@ -179,10 +179,7 @@ func (t *Tree) AddBatchOpt(keys, values [][]byte) ([]int, error) { return nil, err } - if err = t.finalizeAddBatch(); err != nil { - return nil, err - } - return invalids, nil + return t.finalizeAddBatch(len(keys), invalids) } // CASE B: if nLeafs