ProcessTxs fees collct update & tests, and other:

- Update StateDB ProcessTxs fees collection
- Update ProcessTxs tests to last StateDB & Til changes
- Til Blockchain L2Txs remove Nonce generation, update tests accordingly
- Update Til Set to test fees
This commit is contained in:
arnaucube
2020-10-28 17:10:31 +01:00
parent 90db8a1106
commit 2338b6b90b
7 changed files with 170 additions and 89 deletions

View File

@@ -24,6 +24,7 @@ import (
var tokenConsts = map[common.TokenID]eth.ERC20Consts{}
var forceExits = map[int64][]common.ExitInfo{} // ForgeL1TxsNum -> []exit
var nonces = map[common.Idx]common.Nonce{}
type timer struct {
time int64
@@ -441,6 +442,8 @@ func TestSync(t *testing.T) {
tx := &batch.L2Txs[k]
tx.Position = position
position++
nonces[tx.FromIdx]++
tx.Nonce = nonces[tx.FromIdx]
nTx, err := common.NewL2Tx(tx)
require.Nil(t, err)
*tx = *nTx