Commit 4cef7da
fix(eth): clear the wrapped mempool on alt-cache read-path eviction
GetTransaction's read-path staleness eviction called RemoveTransaction, which
clears only the alternative-provider cache, whereas every reconcile/RBF eviction
routes through removeMempoolTx and its removeTransactionFromMempool delegate that
also clears the wrapped Blockbook mempool's per-address index. The gap was masked
because the caller (EthereumRPC.GetTransaction) then queries the primary RPC and,
on a null result, cleans the mempool itself - but when that primary
eth_getTransactionByHash call errors instead of returning null, it returns early
without cleanup, leaving the expired private tx listed as pending for the address
until the 10-minute mempool sweep.
Route the read-path eviction through removeMempoolTx like the others. Safe from
re-entrancy: GetTransaction holds no mempool lock when calling the provider, and
MempoolEthereumType.RemoveTransactionFromMempool takes only its own mutex.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent a427eef commit 4cef7da
2 files changed
Lines changed: 39 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
427 | 427 | | |
428 | 428 | | |
429 | 429 | | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | | - | |
434 | | - | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
435 | 437 | | |
436 | 438 | | |
437 | 439 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1401 | 1401 | | |
1402 | 1402 | | |
1403 | 1403 | | |
| 1404 | + | |
| 1405 | + | |
| 1406 | + | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
| 1411 | + | |
| 1412 | + | |
| 1413 | + | |
| 1414 | + | |
| 1415 | + | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
| 1431 | + | |
| 1432 | + | |
| 1433 | + | |
| 1434 | + | |
| 1435 | + | |
0 commit comments