-
Notifications
You must be signed in to change notification settings - Fork 780
Open
Labels
bugSomething isn't workingSomething isn't workinglogsAnything relating to loggingAnything relating to loggingmempool
Description
The following error message may appear many times in a log:
2024-11-12T02:36:16.276 ERR Could not add sender to tx module=mempool tx=5046AA33917146F4AD4718301C9006449B6E6EC37CAE2929FC81637C7A7F889D sender=4fe295e4cfad69f1247ad85975c6fd87757195db err="transaction not found in mempool"
There are two instances in the code where this message is logged:
- The transaction is being added to the mempool, it's already in the cache but not in the mempool, probably because it never was added (it was invalid) or it got removed.
- If
addSenderreturnsErrTxNotFound, there's no real error here. So the logging message should not be displayed. - If
addSenderreturns other kind of error (ErrTxAlreadyReceivedFromSender), then the error should be displayed.
- If
- The transaction being added is valid, not in cache, and already in the mempool because the cache overflowed (#890). The node has received the transaction from a sender already in the senders list, so
addSenderreturnsErrTxAlreadyReceivedFromSender.- There's already a Debug message for this situation. It should be changed to an Error message. This error is important because it shows that the cache is small.
- Then the error from
addSenderis redundant. There's no need to display it.
Probably addSender should never return ErrTxNotFound: if there's no mempool entry when adding a sender, just return nil.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinglogsAnything relating to loggingAnything relating to loggingmempool