NewBatch takes size, batch.Add doesn't use append

This commit is contained in:
Ethan Buchman
2017-04-18 20:23:58 -04:00
parent b6a04a3456
commit 45876d0828
3 changed files with 12 additions and 9 deletions

View File

@ -246,7 +246,7 @@ func (s *State) ApplyBlock(eventCache types.Fireable, proxyAppConn proxy.AppConn
return fmt.Errorf("Commit failed for application: %v", err)
}
batch := txindex.NewBatch()
batch := txindex.NewBatch(block.NumTxs)
for _, r := range txResults {
batch.Add(*r)
}