-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
txpool: continue pool pruning even if a tx can't be found #8415
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
Looking forward to the revealing of the root cause for that meta finding problem!
@@ -423,8 +436,14 @@ namespace cryptonote | |||
txpool_tx_meta_t meta; | |||
if (!m_blockchain.get_txpool_tx_meta(txid, meta)) | |||
{ | |||
MERROR("Failed to find tx_meta in txpool"); | |||
return; | |||
static bool warned = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes it print the error once per daemon launch, not once per tx_memory_pool::prune
call like it was before. Any specific reason for this change? To copy the previous behavior, warned
shouldn't be static and it should be initialized outside of the while
loop.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once the cap is reached, it will print here incessantly. I assume it wasn't realized that incessant printing would occur here because normal usage hasn't breached the default cap to my knowledge.
This matches #6881
monero/src/cryptonote_core/tx_pool.cpp
Lines 1451 to 1459 in d52b7d0
txpool_tx_meta_t meta; | |
if (!m_blockchain.get_txpool_tx_meta(sorted_it->second, meta)) | |
{ | |
static bool warned = false; | |
if (!warned) | |
MERROR(" failed to find tx meta: " << sorted_it->second << " (will only print once)"); | |
warned = true; | |
continue; | |
} |
return
tocontinue
to ensure pool pruning executes to completion."Failed to find tx_meta in txpool"
error. Noticed the cause of the error while reviewing that PR and that PR seems well positioned to solve it.