Documentation ¶
Index ¶
- 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) IsOnTake(num *big.Int) bool
- func (s *State) ResetL1Current(ctx context.Context, blockID *big.Int) error
- func (s *State) SetL1Current(h *types.Header)
- func (s *State) SubL1HeadsFeed(ch chan *types.Header) event.Subscription
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type State ¶
type State struct { // Constants GenesisL1Height *big.Int OnTakeForkHeight *big.Int // 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) IsOnTake ¶
IsOnTake returns whether num is either equal to the ontake block or greater.
func (*State) ResetL1Current ¶
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.