From cb48e25ccf78b49fd4a24c253aa7209b6d2389c6 Mon Sep 17 00:00:00 2001 From: Daniel Liu <139250065@qq.com> Date: Mon, 19 Jan 2026 14:48:08 +0800 Subject: [PATCH] core/txpool: declare `address already reserved` error #29095 (#1920) --- core/txpool/errors.go | 6 ++++++ core/txpool/txpool.go | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/core/txpool/errors.go b/core/txpool/errors.go index a4ed6a1498..8911e59676 100644 --- a/core/txpool/errors.go +++ b/core/txpool/errors.go @@ -59,6 +59,12 @@ var ( // transaction. Future transactions should only be able to replace other future transactions. ErrFutureReplacePending = errors.New("future transaction tries to replace pending") + // ErrAlreadyReserved is returned if the sender address has a pending transaction + // in a different subpool. For example, this error is returned in response to any + // input transaction of non-blob type when a blob transaction from this sender + // remains pending (and vice-versa). + ErrAlreadyReserved = errors.New("address already reserved") + ErrZeroGasPrice = errors.New("zero gas price") ErrUnderMinGasPrice = errors.New("under min gas price") diff --git a/core/txpool/txpool.go b/core/txpool/txpool.go index 630d48aeb7..9d49d431e0 100644 --- a/core/txpool/txpool.go +++ b/core/txpool/txpool.go @@ -118,7 +118,7 @@ func (p *TxPool) reserver(id int, subpool SubPool) AddressReserver { log.Error("pool attempted to reserve already-owned address", "address", addr) return nil // Ignore fault to give the pool a chance to recover while the bug gets fixed } - return errors.New("address already reserved") + return ErrAlreadyReserved } p.reservations[addr] = subpool if metrics.Enabled() {