Skip to content

Commit

Permalink
fix: 127. Convert warning to error if L1InfoTreeUpdateV2 doesnt pass …
Browse files Browse the repository at this point in the history
…sanity check (#128)
  • Loading branch information
joanestebanr authored Oct 8, 2024
1 parent c7e7170 commit 2eee781
Show file tree
Hide file tree
Showing 13 changed files with 1,023 additions and 135 deletions.
14 changes: 14 additions & 0 deletions state/entities/l1_info_tree_leaf.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package entities

import (
"fmt"
"time"

"github.com/ethereum/go-ethereum/common"
Expand All @@ -16,3 +17,16 @@ type L1InfoTreeLeaf struct {
RollupExitRoot common.Hash
GlobalExitRoot common.Hash
}

func (l *L1InfoTreeLeaf) String() string {

if l == nil {
return "nil"
}
return fmt.Sprintf("L1InfoTreeRoot:%s L1InfoTreeIndex:%d PreviousBlockHash:%s "+
"BlockNumber:%d Timestamp:%s MainnetExitRoot:%s RollupExitRoot:%s GlobalExitRoot:%s",
l.L1InfoTreeRoot.String(), l.L1InfoTreeIndex, l.PreviousBlockHash.String(),
l.BlockNumber, l.Timestamp.String(), l.MainnetExitRoot.String(),
l.RollupExitRoot.String(), l.GlobalExitRoot.String())

}
58 changes: 58 additions & 0 deletions state/mocks/storer.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2eee781

Please sign in to comment.