mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
miner: remove question
This commit is contained in:
parent
2179c43eac
commit
1fdb204bc5
1 changed files with 3 additions and 4 deletions
|
|
@ -949,19 +949,18 @@ func (w *worker) prepareWork(genParams *generateParams) (*environment, error) {
|
|||
// into the given sealing block. The transaction selection and ordering strategy can
|
||||
// be customized with the plugin in the future.
|
||||
func (w *worker) fillTransactions(interrupt *atomic.Int32, env *environment) error {
|
||||
// Split the pending transactions into locals and remotes
|
||||
// Fill the block with all available pending transactions.
|
||||
pending := w.eth.TxPool().Pending(true)
|
||||
|
||||
// Split the pending transactions into locals and remotes.
|
||||
localTxs, remoteTxs := make(map[common.Address][]*txpool.LazyTransaction), pending
|
||||
for _, account := range w.eth.TxPool().Locals() {
|
||||
if txs := remoteTxs[account]; len(txs) > 0 {
|
||||
delete(remoteTxs, account)
|
||||
// QQ: this seems to overwrite the local account,
|
||||
// should we instead deduplicate then append?
|
||||
localTxs[account] = txs
|
||||
}
|
||||
}
|
||||
|
||||
// Fill the block with all available pending transactions.
|
||||
if len(localTxs) > 0 {
|
||||
txs := newTransactionsByPriceAndNonce(env.signer, localTxs, env.header.BaseFee)
|
||||
if err := w.commitTransactions(env, txs, interrupt); err != nil {
|
||||
|
|
|
|||
Loading…
Reference in a new issue