mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
Wrapped in pool.config.PrioritizeLocals() for readbility
This commit is contained in:
parent
d5848e3af9
commit
ee8097e44d
1 changed files with 5 additions and 1 deletions
|
|
@ -152,6 +152,10 @@ var DefaultConfig = Config{
|
|||
Lifetime: 3 * time.Hour,
|
||||
}
|
||||
|
||||
func (config *Config) PrioritizeLocals() bool {
|
||||
return !config.NoLocals
|
||||
}
|
||||
|
||||
// sanitize checks the provided user configurations and changes anything that's
|
||||
// unreasonable or unworkable.
|
||||
func (config *Config) sanitize() Config {
|
||||
|
|
@ -596,7 +600,7 @@ func (pool *LegacyPool) validateTxBasics(tx *types.Transaction, local bool) erro
|
|||
MaxSize: txMaxSize,
|
||||
MinTip: pool.gasTip.Load(),
|
||||
}
|
||||
if local && !pool.config.NoLocals {
|
||||
if local && pool.config.PrioritizeLocals() {
|
||||
opts.MinTip = new(big.Int)
|
||||
}
|
||||
if err := txpool.ValidateTransaction(tx, pool.currentHead.Load(), pool.signer, opts); err != nil {
|
||||
|
|
|
|||
Loading…
Reference in a new issue