diff --git a/miner/bidder.go b/miner/bidder.go index 4387079fee..3469775448 100644 --- a/miner/bidder.go +++ b/miner/bidder.go @@ -278,7 +278,8 @@ func (b *Bidder) bid(work *environment) { _, err := cli.SendBid(context.Background(), bidArgs) if err != nil { b.deleteBestWork(work) - log.Error("Bidder: bidding failed", "err", err, "number", work.header.Number, "txcount", len(work.txs), "unrevertible", len(work.UnRevertible)) + log.Error("Bidder: bidding failed", "err", err, "number", work.header.Number, "txcount", len(work.txs), + "unrevertible", len(work.UnRevertible), "packing_duration", work.duration.Milliseconds()) var bidErr rpc.Error ok := errors.As(err, &bidErr) @@ -290,7 +291,8 @@ func (b *Bidder) bid(work *environment) { } b.deleteBestWork(work) - log.Info("Bidder: bidding success", "number", work.header.Number, "txs", len(work.txs)) + log.Info("Bidder: bidding success", "number", work.header.Number, "txs", len(work.txs), + "packing_duration", work.duration.Milliseconds()) } // isBestWork returns the work is better than the current best work diff --git a/miner/worker.go b/miner/worker.go index ca95eae8de..884453b721 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -99,6 +99,7 @@ type environment struct { profit *big.Int // block gas fee + BNBSentToSystem UnRevertible []common.Hash + duration time.Duration } // copy creates a deep copy of environment. @@ -1311,6 +1312,7 @@ LOOP: fillStart := time.Now() err = w.fillTransactionsAndBundles(interruptCh, work, stopTimer) fillDuration := time.Since(fillStart) + work.duration = fillDuration switch { case errors.Is(err, errBlockInterruptedByNewHead): // work.discard()