Skip to content

Commit

Permalink
Fix non e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
ARR552 committed Apr 4, 2024
1 parent 2d65e0a commit e815320
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
5 changes: 2 additions & 3 deletions l1infotree/tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ func NewL1InfoTree(height uint8, initialLeaves [][32]byte) (*L1InfoTree, error)
func (mt *L1InfoTree) ResetL1InfoTree(initialLeaves [][32]byte) (*L1InfoTree, error) {
log.Info("Resetting L1InfoTree...")
newMT := &L1InfoTree{
zeroHashes: mt.zeroHashes,
height: mt.height,
zeroHashes: generateZeroHashes(32), // nolint:gomnd
height: 32, // nolint:gomnd
count: uint32(len(initialLeaves)),
}
var err error
Expand All @@ -50,7 +50,6 @@ func (mt *L1InfoTree) ResetL1InfoTree(initialLeaves [][32]byte) (*L1InfoTree, er
}
log.Debug("Reset initial count: ", newMT.count)
log.Debug("Reset initial root: ", newMT.currentRoot)
mt = newMT
return newMT, nil
}

Expand Down
10 changes: 10 additions & 0 deletions synchronizer/synchronizer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,11 @@ func TestForcedBatchEtrog(t *testing.T) {
Return(blocks, order, nil).
Once()

m.Etherman.
On("EthBlockByNumber", ctx, lastBlock.BlockNumber).
Return(ethBlock, nil).
Once()

m.ZKEVMClient.
On("BatchNumber", ctx).
Return(uint64(1), nil)
Expand Down Expand Up @@ -509,6 +514,11 @@ func TestSequenceForcedBatchIncaberry(t *testing.T) {
Return(blocks, order, nil).
Once()

m.Etherman.
On("EthBlockByNumber", ctx, lastBlock.BlockNumber).
Return(ethBlock, nil).
Once()

m.State.
On("BeginStateTransaction", ctx).
Return(m.DbTx, nil).
Expand Down

0 comments on commit e815320

Please sign in to comment.