Skip to content

Commit

Permalink
add logs in miner
Browse files Browse the repository at this point in the history
  • Loading branch information
manav2401 committed Feb 7, 2025
1 parent 983b715 commit 13f2a3b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion consensus/bor/bor.go
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ func (c *Bor) verifyCascadingFields(chain consensus.ChainHeaderReader, header *t
if IsSprintStart(number+1, c.config.CalculateSprint(number)) {
// Use parent block's hash to make the eth_call to fetch validators so that the state being
// used to make the call is of the same fork.
newValidators, err := c.spanner.GetCurrentValidatorsByBlockNrOrHash(context.Background(), rpc.BlockNumberOrHashWithHash(header.ParentHash, false), number+1)
newValidators, err := c.spanner.GetCurrentValidatorsByBlockNrOrHash(context.Background(), rpc.BlockNumberOrHashWithNumber(rpc.LatestBlockNumber), number+1)
if err != nil {
return err
}
Expand Down
2 changes: 2 additions & 0 deletions miner/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -621,13 +621,15 @@ func (w *worker) mainLoop(ctx context.Context) {
req.result <- w.generateWork(ctx, req.params)

case ev := <-w.txsCh:
log.Info("[debug] received new tx event", "w.current != nil", w.current != nil, "w.IsRunning", w.IsRunning())
// Apply transactions to the pending state if we're not sealing
//
// Note all transactions received may not be continuous with transactions
// already included in the current sealing block. These transactions will
// be automatically eliminated.
// nolint : nestif
if !w.IsRunning() && w.current != nil {
log.Info("[debug] commiting new txs")
// If block is already full, abort
if gp := w.current.gasPool; gp != nil && gp.Gas() < params.TxGas {
continue
Expand Down

0 comments on commit 13f2a3b

Please sign in to comment.