core, eth, miner: enforce configured mining reward post 1559 too

This commit is contained in:
Péter Szilágyi
2021-06-04 09:55:00 +03:00
parent 3094e7f3b8
commit 7e915ee379
9 changed files with 39 additions and 12 deletions

View File

@ -231,7 +231,7 @@ func (b *EthAPIBackend) SendTx(ctx context.Context, signedTx *types.Transaction)
}
func (b *EthAPIBackend) GetPoolTransactions() (types.Transactions, error) {
pending, err := b.eth.txPool.Pending()
pending, err := b.eth.txPool.Pending(false)
if err != nil {
return nil, err
}

View File

@ -127,7 +127,7 @@ func (api *consensusAPI) AssembleBlock(params assembleBlockParams) (*executableD
time.Sleep(wait)
}
pending, err := pool.Pending()
pending, err := pool.Pending(true)
if err != nil {
return nil, err
}

View File

@ -66,7 +66,7 @@ type txPool interface {
// Pending should return pending transactions.
// The slice should be modifiable by the caller.
Pending() (map[common.Address]types.Transactions, error)
Pending(enforceTips bool) (map[common.Address]types.Transactions, error)
// SubscribeNewTxsEvent should return an event subscription of
// NewTxsEvent and send events to the given channel.

View File

@ -91,7 +91,7 @@ func (p *testTxPool) AddRemotes(txs []*types.Transaction) []error {
}
// Pending returns all the transactions known to the pool
func (p *testTxPool) Pending() (map[common.Address]types.Transactions, error) {
func (p *testTxPool) Pending(enforceTips bool) (map[common.Address]types.Transactions, error) {
p.lock.RLock()
defer p.lock.RUnlock()

View File

@ -54,7 +54,7 @@ func (h *handler) syncTransactions(p *eth.Peer) {
//
// TODO(karalabe): Figure out if we could get away with random order somehow
var txs types.Transactions
pending, _ := h.txpool.Pending()
pending, _ := h.txpool.Pending(false)
for _, batch := range pending {
txs = append(txs, batch...)
}