Skip to content

Mempool fail to calculate next sequence on heavy load #1972

@majecty

Description

@majecty

When we run TPS checker, a few seconds later CodeChain move transactions to future queue, but it should not use the future queue.

I'm suspecting the usage of the best block. The mempool::add code read the best block's state multiple times. If the best block is changed while running the mempool::add code it can make a bug that hard to find.

I made mempool::add to acquire importer lock and the bug does not appear.
ed1571b

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions