mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-08 03:46:52 +01:00
Abstract txs generation for ZKInputs tests
- TxProcessor move txCompressedDataEmpty inside the if of tp.zki!=nil - Abstract generation of transactions for ZKInput tests to avoid code repetition - used at txprocessor & test/zkproof tests
This commit is contained in:
26
test/txsets/tilsets_test.go
Normal file
26
test/txsets/tilsets_test.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package txsets
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/hermeznetwork/hermez-node/common"
|
||||
"github.com/hermeznetwork/hermez-node/test/til"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestCompileSetsBase(t *testing.T) {
|
||||
tc := til.NewContext(0, common.RollupConstMaxL1UserTx)
|
||||
_, err := tc.GenerateBlocks(SetBlockchain0)
|
||||
assert.NoError(t, err)
|
||||
_, err = tc.GeneratePoolL2Txs(SetPool0)
|
||||
assert.NoError(t, err)
|
||||
}
|
||||
|
||||
func TestCompileSetsMinimumFlow(t *testing.T) {
|
||||
// minimum flow
|
||||
tc := til.NewContext(0, common.RollupConstMaxL1UserTx)
|
||||
_, err := tc.GenerateBlocks(SetBlockchainMinimumFlow0)
|
||||
assert.NoError(t, err)
|
||||
_, err = tc.GeneratePoolL2Txs(SetPoolL2MinimumFlow0)
|
||||
assert.NoError(t, err)
|
||||
}
|
||||
Reference in New Issue
Block a user