Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jwasinger committed Jun 28, 2023
1 parent 8ef8a09 commit 71456cf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions eth/catalyst/simulated_beacon.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import (

// withdrawalQueue implements a FIFO queue which holds withdrawals that are pending inclusion
type withdrawalQueue struct {
// TODO: implement closing logic for this channel
pending chan *types.Withdrawal
}

Expand Down Expand Up @@ -133,6 +132,7 @@ func (c *SimulatedBeacon) Stop() error {
return nil
}

// sealBlock initiates payload building for a new block and creates a new block with the completed payload
func (c *SimulatedBeacon) sealBlock(withdrawals []*types.Withdrawal) error {
tstamp := uint64(time.Now().Unix())
if tstamp <= c.lastBlockTime {
Expand Down Expand Up @@ -181,6 +181,7 @@ func (c *SimulatedBeacon) sealBlock(withdrawals []*types.Withdrawal) error {
return nil
}

// loopOnDemand runs the block production loop for "on-demand" configuration (period = 0)
func (c *SimulatedBeacon) loopOnDemand() {
var (
newTxs = make(chan core.NewTxsEvent)
Expand Down Expand Up @@ -208,8 +209,7 @@ func (c *SimulatedBeacon) loopOnDemand() {
}
}

// loop manages the lifecycle of the SimulatedBeacon.
// it drives block production, taking the role of a CL client and interacting with Geth via public engine/eth APIs
// loopOnDemand runs the block production loop for non-zero period configuration
func (c *SimulatedBeacon) loop() {
timer := time.NewTimer(time.Duration(0))
for {
Expand Down

0 comments on commit 71456cf

Please sign in to comment.