core/txpool/legacypool: check code hash to determine delegation status

This commit is contained in:
lightclient 2025-02-07 13:19:52 -07:00
parent 2dc72d52f7
commit 37d91cde0d
No known key found for this signature in database
GPG key ID: 657913021EF45A6A

View file

@ -567,7 +567,7 @@ func (pool *LegacyPool) validateTx(tx *types.Transaction) error {
if list := pool.queue[addr]; list != nil { if list := pool.queue[addr]; list != nil {
have += list.Len() have += list.Len()
} }
if pool.currentState.GetCode(addr) != nil { if pool.currentState.GetCodeHash(addr) != types.EmptyCodeHash {
// Allow at most one in-flight tx for delegated accounts. // Allow at most one in-flight tx for delegated accounts.
return have, max(0, 1-have) return have, max(0, 1-have)
} }