Documentation ¶
Index ¶
- type HeightOrID
- type State
- func (s *State) Close()
- func (s *State) GetHeadBlockID() *big.Int
- func (s *State) GetL1Current() *types.Header
- func (s *State) GetL1Head() *types.Header
- func (s *State) GetL2Head() *types.Header
- func (s *State) GetLatestVerifiedBlock() *VerifiedHeaderInfo
- func (s *State) ResetL1Current(ctx context.Context, heightOrID *HeightOrID) (*bindings.MxcL1ClientBlockProposed, *big.Int, error)
- func (s *State) SetL1Current(h *types.Header)
- func (s *State) SubL1HeadsFeed(ch chan *types.Header) event.Subscription
- func (s *State) VerifyL2Block(ctx context.Context, height *big.Int, hash common.Hash) error
- type VerifiedHeaderInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HeightOrID ¶
HeightOrID contains a block height or a block ID.
func (*HeightOrID) NotEmpty ¶
func (h *HeightOrID) NotEmpty() bool
NotEmpty checks whether this is an empty struct.
type State ¶
type State struct { // Constants GenesisL1Height *big.Int BlockDeadendHash common.Hash // contains filtered or unexported fields }
State contains all states which will be used by driver.
func (*State) GetHeadBlockID ¶
GetHeadBlockID reads the last pending block ID concurrent safely.
func (*State) GetL1Current ¶
GetL1Current reads the L1 current cursor concurrent safely.
func (*State) GetLatestVerifiedBlock ¶
func (s *State) GetLatestVerifiedBlock() *VerifiedHeaderInfo
GetLatestVerifiedBlock reads the latest verified L2 block concurrent safely.
func (*State) ResetL1Current ¶
func (s *State) ResetL1Current( ctx context.Context, heightOrID *HeightOrID, ) (*bindings.MxcL1ClientBlockProposed, *big.Int, error)
ResetL1Current resets the l1Current cursor to the L1 height which emitted a BlockProposed event with given blockID / blockHash.
func (*State) SetL1Current ¶
SetL1Current sets the L1 current cursor concurrent safely.
func (*State) SubL1HeadsFeed ¶
func (s *State) SubL1HeadsFeed(ch chan *types.Header) event.Subscription
SubL1HeadsFeed registers a subscription of new L1 heads.
Click to show internal directories.
Click to hide internal directories.