mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 09:23:48 +00:00
core/txpool: simplify known conflicts
This commit is contained in:
parent
e01a04292e
commit
e3223c8ec5
1 changed files with 2 additions and 7 deletions
|
|
@ -597,14 +597,9 @@ func (pool *LegacyPool) validateTx(tx *types.Transaction) error {
|
||||||
}
|
}
|
||||||
// Authorities cannot conflict with any pending or queued transactions.
|
// Authorities cannot conflict with any pending or queued transactions.
|
||||||
for _, addr := range auths {
|
for _, addr := range auths {
|
||||||
var known bool
|
|
||||||
if list := pool.pending[addr]; list != nil {
|
if list := pool.pending[addr]; list != nil {
|
||||||
known = true
|
conflicts = append(conflicts, addr)
|
||||||
}
|
} else if list := pool.queue[addr]; list != nil {
|
||||||
if list := pool.queue[addr]; list != nil {
|
|
||||||
known = true
|
|
||||||
}
|
|
||||||
if known {
|
|
||||||
conflicts = append(conflicts, addr)
|
conflicts = append(conflicts, addr)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue