Skip to content

truncateQueue method drops the newest txs rather than the oldest ones. #24907

@zhaochonghe

Description

@zhaochonghe

// truncateQueue drops the oldes transactions in the queue if the pool is above the global queue limit.

According to its annotation, it seems to drop the oldest txs first when the length of queue is above the global queue limit.
addr := addresses[len(addresses)-1]

But actually, it first drops the newest txs (the last element in addresses), since the elements in addresses are ordered from oldest to newest . Should it change to addr := addresses[0] ?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions