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

@@ -294,8 +294,8 @@ func (tp *TxProcessor) ProcessTxs(coordIdxs []common.Idx, l1usertxs, l1coordinat
}
}
txCompressedDataEmpty := common.TxCompressedDataEmpty(tp.config.ChainID)
if tp.zki != nil {
txCompressedDataEmpty := common.TxCompressedDataEmpty(tp.config.ChainID)
last := tp.i - 1
if tp.i == 0 {
last = 0