Add idx for txs that creat account, step1

This commit is contained in:
Arnau B
2021-01-13 13:18:32 +01:00
committed by Eduard S
parent 6651df1e52
commit 50fc607306
6 changed files with 76 additions and 69 deletions

View File

@@ -752,7 +752,7 @@ func TestSetInitialSCVars(t *testing.T) {
require.Equal(t, wDelayer, dbWDelayer)
}
func TestSetL1UserTxEffectiveAmounts(t *testing.T) {
func TestSetExtraInfoForgedL1UserTxs(t *testing.T) {
test.WipeDB(historyDB.DB())
set := `
@@ -789,7 +789,7 @@ func TestSetL1UserTxEffectiveAmounts(t *testing.T) {
require.NoError(t, err)
}
// Add second batch to trigger the update of the batch_num,
// while avoiding the implicit call of setL1UserTxEffectiveAmounts
// while avoiding the implicit call of setExtraInfoForgedL1UserTxs
err = historyDB.addBlock(historyDB.db, &blocks[1].Block)
assert.NoError(t, err)
err = historyDB.addBatch(historyDB.db, &blocks[1].Rollup.Batches[0].Batch)
@@ -803,7 +803,7 @@ func TestSetL1UserTxEffectiveAmounts(t *testing.T) {
l1Txs[1].EffectiveAmount = big.NewInt(0)
l1Txs[2].EffectiveDepositAmount = big.NewInt(0)
l1Txs[2].EffectiveAmount = big.NewInt(0)
err = historyDB.setL1UserTxEffectiveAmounts(historyDB.db, l1Txs)
err = historyDB.setExtraInfoForgedL1UserTxs(historyDB.db, l1Txs)
require.NoError(t, err)
dbL1Txs, err := historyDB.GetAllL1UserTxs()