Skip to content

Commit

Permalink
Merge pull request ethereum#60 from lochjin/v1.14.11-qng
Browse files Browse the repository at this point in the history
feat:Force update pending on miner for qng
  • Loading branch information
dindinw authored Oct 11, 2024
2 parents f832b5c + 5284861 commit 0414844
Showing 1 changed file with 5 additions and 22 deletions.
27 changes: 5 additions & 22 deletions miner/miner_qng.go
Original file line number Diff line number Diff line change
@@ -1,29 +1,12 @@
package miner

import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/core/types"
)

func (payload *Payload) ResolveFullBlock() *types.Block {
payload.lock.Lock()
defer payload.lock.Unlock()

if payload.full == nil {
select {
case <-payload.stop:
return nil
default:
}
// Wait the full payload construction. Note it might block
// forever if Resolve is called in the meantime which
// terminates the background construction process.
payload.cond.Wait()
}
// Terminate the background payload construction
select {
case <-payload.stop:
default:
close(payload.stop)
}
return payload.full
func (miner *Miner) ForcePending() (*types.Block, types.Receipts, *state.StateDB) {
miner.pending.update(common.Hash{}, nil)
return miner.Pending()
}

0 comments on commit 0414844

Please sign in to comment.