miner: polish miner configuration (#19480)
* cmd, eth, miner: disable advance sealing if user require * cmd, console, miner, les, eth: wrap the miner config * eth: remove todo * cmd, miner: revert noadvance flag The reason for this is: if the transaction execution is even longer than block time, then this kind of transactions is DoS attack.
This commit is contained in:
committed by
Péter Szilágyi
parent
d9403690ec
commit
6269e5574c
@ -52,6 +52,12 @@ var (
|
||||
// Test transactions
|
||||
pendingTxs []*types.Transaction
|
||||
newTxs []*types.Transaction
|
||||
|
||||
testConfig = &Config{
|
||||
Recommit: time.Second,
|
||||
GasFloor: params.GenesisGasLimit,
|
||||
GasCeil: params.GenesisGasLimit,
|
||||
}
|
||||
)
|
||||
|
||||
func init() {
|
||||
@ -134,7 +140,7 @@ func (b *testWorkerBackend) PostChainEvents(events []interface{}) {
|
||||
func newTestWorker(t *testing.T, chainConfig *params.ChainConfig, engine consensus.Engine, blocks int) (*worker, *testWorkerBackend) {
|
||||
backend := newTestWorkerBackend(t, chainConfig, engine, blocks)
|
||||
backend.txPool.AddLocals(pendingTxs)
|
||||
w := newWorker(chainConfig, engine, backend, new(event.TypeMux), time.Second, params.GenesisGasLimit, params.GenesisGasLimit, nil)
|
||||
w := newWorker(testConfig, chainConfig, engine, backend, new(event.TypeMux), nil)
|
||||
w.setEtherbase(testBankAddress)
|
||||
return w, backend
|
||||
}
|
||||
|
Reference in New Issue
Block a user