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:
arnaucube
2021-01-13 14:01:13 +01:00
parent 75f068baa8
commit a16ec1750e
9 changed files with 580 additions and 642 deletions

View File

@@ -25,6 +25,7 @@ import (
"github.com/hermeznetwork/hermez-node/log"
"github.com/hermeznetwork/hermez-node/test"
"github.com/hermeznetwork/hermez-node/test/til"
"github.com/hermeznetwork/hermez-node/test/txsets"
"github.com/hermeznetwork/tracerr"
)
@@ -269,7 +270,7 @@ func TestMain(m *testing.M) {
}
AddAditionalInformation(blocksData)
// Generate L2 Txs with til
commonPoolTxs, err := tcc.GeneratePoolL2Txs(til.SetPoolL2MinimumFlow0)
commonPoolTxs, err := tcc.GeneratePoolL2Txs(txsets.SetPoolL2MinimumFlow0)
if err != nil {
panic(err)
}