The issue here is that though we take for the block size the minimum between the batch size and the block size consensus params, in those lines we also append the commit to the batch (+ the overhead of the struct of the batch itself) so in some cases the batch won't get populated with any blocks (as it may be that the first block in the batch + commit > max batch size) which would lead to inability to submit batches.
The issue here is that though we take for the block size the minimum between the batch size and the block size consensus params, in those lines we also append the commit to the batch (+ the overhead of the struct of the batch itself) so in some cases the batch won't get populated with any blocks (as it may be that the first block in the batch + commit > max batch size) which would lead to inability to submit batches.