mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 07:06:42 +00:00
core/txpool: demote error log to warn
This PR addresses the issue discussed in #22301 where Geth logs an error message when invalidating a pending transaction. Since this behavior is expected and properly handled by the code (as noted in the comment "// If there's a gap in front, alert (should never happen) and postpone all transactions"), the log level should be downgraded from Error to Warning to reduce unnecessary noise in the logs. The change affects only one line in txpool.go where the log message "Demoting invalidated transaction" is generated when there's a gap in transaction sequence that forces invalidation of pending transactions.
This commit is contained in:
parent
624a5d8b23
commit
fb5919f51d
1 changed files with 3 additions and 3 deletions
|
|
@ -120,7 +120,7 @@ func (p *TxPool) reserver(id int, subpool SubPool) AddressReserver {
|
||||||
// avoid subtle bugs in the long term.
|
// avoid subtle bugs in the long term.
|
||||||
if exists {
|
if exists {
|
||||||
if owner == subpool {
|
if owner == subpool {
|
||||||
log.Error("pool attempted to reserve already-owned address", "address", addr)
|
log.Warn("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 nil // Ignore fault to give the pool a chance to recover while the bug gets fixed
|
||||||
}
|
}
|
||||||
return ErrAlreadyReserved
|
return ErrAlreadyReserved
|
||||||
|
|
@ -135,11 +135,11 @@ func (p *TxPool) reserver(id int, subpool SubPool) AddressReserver {
|
||||||
// Ensure subpools only attempt to unreserve their own owned addresses,
|
// Ensure subpools only attempt to unreserve their own owned addresses,
|
||||||
// otherwise flag as a programming error.
|
// otherwise flag as a programming error.
|
||||||
if !exists {
|
if !exists {
|
||||||
log.Error("pool attempted to unreserve non-reserved address", "address", addr)
|
log.Warn("pool attempted to unreserve non-reserved address", "address", addr)
|
||||||
return errors.New("address not reserved")
|
return errors.New("address not reserved")
|
||||||
}
|
}
|
||||||
if subpool != owner {
|
if subpool != owner {
|
||||||
log.Error("pool attempted to unreserve non-owned address", "address", addr)
|
log.Warn("pool attempted to unreserve non-owned address", "address", addr)
|
||||||
return errors.New("address not owned")
|
return errors.New("address not owned")
|
||||||
}
|
}
|
||||||
delete(p.reservations, addr)
|
delete(p.reservations, addr)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue