mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-06 19:06:42 +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:
@@ -20,6 +20,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/hermez-node/txprocessor"
|
||||
"github.com/iden3/go-iden3-crypto/babyjub"
|
||||
"github.com/jmoiron/sqlx"
|
||||
@@ -155,12 +156,12 @@ func checkSortedByNonce(t *testing.T, testAccNonces map[common.Idx]common.Nonce,
|
||||
func TestGetL2TxSelectionMinimumFlow0(t *testing.T) {
|
||||
chainID := uint16(0)
|
||||
hermezContractAddr := ethCommon.HexToAddress("0xc344E203a046Da13b0B4467EB7B3629D0C99F6E6")
|
||||
txsel, tc := initTest(t, chainID, hermezContractAddr, til.SetPool0)
|
||||
txsel, tc := initTest(t, chainID, hermezContractAddr, txsets.SetPool0)
|
||||
|
||||
// generate test transactions, the L1CoordinatorTxs generated by Til
|
||||
// will be ignored at this test, as will be the TxSelector who
|
||||
// generates them when needed
|
||||
blocks, err := tc.GenerateBlocks(til.SetBlockchainMinimumFlow0)
|
||||
blocks, err := tc.GenerateBlocks(txsets.SetBlockchainMinimumFlow0)
|
||||
assert.NoError(t, err)
|
||||
|
||||
// restart nonces of TilContext, as will be set by generating directly
|
||||
|
||||
Reference in New Issue
Block a user