diff --git a/core/txpool/legacypool/legacypool.go b/core/txpool/legacypool/legacypool.go index 1cc6856663..eb86bc4bda 100644 --- a/core/txpool/legacypool/legacypool.go +++ b/core/txpool/legacypool/legacypool.go @@ -633,10 +633,21 @@ func (pool *LegacyPool) validateAuth(tx *types.Transaction) error { return ErrInflightTxLimitReached } } - // Authorities cannot conflict with any pending or queued transactions. + // For symmetry, Allow at most one in-flight tx for any authority with a pending + // transaction if auths := tx.SetCodeAuthorities(); len(auths) > 0 { for _, auth := range auths { - if pool.pending[auth] != nil || pool.queue[auth] != nil { + var count int + pending := pool.pending[auth] + + if pending != nil { + count += pending.Len() + } + queue := pool.queue[auth] + if queue != nil { + count += queue.Len() + } + if count > 1 { return ErrAuthorityReserved } }