Skip to content

Commit

Permalink
fix: dont timeout execution (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
joroshiba authored and bharath-123 committed Jan 13, 2025
1 parent f15971d commit 09284d0
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions miner/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
"fmt"
"math/big"
"sync/atomic"
"time"

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/consensus/misc/eip1559"
Expand Down Expand Up @@ -320,14 +319,10 @@ func (miner *Miner) generateWork(params *generateParams) *newPayloadResult {
}
if !params.noTxs {
interrupt := new(atomic.Int32)
timer := time.AfterFunc(miner.config.Recommit, func() {
interrupt.Store(commitInterruptTimeout)
})
defer timer.Stop()

err := miner.fillAstriaTransactions(interrupt, work)
if errors.Is(err, errBlockInterruptedByTimeout) {
log.Warn("Block building is interrupted", "allowance", common.PrettyDuration(miner.config.Recommit))
log.Error("Block building is interrupted", "allowance", common.PrettyDuration(miner.config.Recommit))
}
}
body := types.Body{Transactions: work.txs, Withdrawals: params.withdrawals}
Expand Down

0 comments on commit 09284d0

Please sign in to comment.