// Call collapseTransactions with a copy of the account state.
// Use this benchmark collapseTransactions.
Call collapseTransactions with a copy of the account state.
Use this benchmark collapseTransactions.
// Call collapseTransactions with a copy of the account state . // Use this benchmark collapseTransactions .
func (g *collapseTestContainer) collapseTransactionsNewState(b *testing.B) (*collapseResults, error) {
	b.StopTimer()
	accountState := NewAccounts(store.NewInmem())
	if err := accountState.Commit(g.accountState.Snapshot()); err != nil {
		return nil, errors.Wrap(err, "failed to commit")
	}
	b.StartTimer()
	results, err := collapseTransactions(g.block.Index, g.txs, g.block, accountState)
	if err != nil {
		return nil, err
	}
	return results, err
}
func ( g * collapseTestContainer ) collapseTransactionsNewState ( b * testing . B ) ( * collapseResults , error ) { b . StopTimer ( ) accountState := NewAccounts ( store . NewInmem ( ) ) if err := accountState . Commit ( g . accountState . Snapshot ( ) ) ; err != nil { return nil , errors . Wrap ( err , " " ) } b . StartTimer ( ) results , err := collapseTransactions ( g . block . Index , g . txs , g . block , accountState ) if err != nil { return nil , err } return results , err }
Call collapseTransactions with a copy of the account state.
Call collapseTransactions with a copy of the account state .