Commit dc8263b
perf(bridge): fetch transaction operations once in processTransaction (#1098)
When a Stellar transaction credited the bridge account more than once,
processTransaction called getOperationEffect(tx.Hash) once per matching
account_credited effect, refetching identical operation data from Horizon
each time and slowing down processing.
Fetch the operations lazily at most once per transaction and reuse the
result across all matching effects. The fetch still happens only when a
matching TFT credit is present (no extra call for unrelated transactions),
and per-effect MintEvent emission is unchanged, so behaviour is preserved.
Closes #1051
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 9dac2ed commit dc8263b
1 file changed
Lines changed: 13 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
502 | 502 | | |
503 | 503 | | |
504 | 504 | | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
505 | 512 | | |
506 | 513 | | |
507 | 514 | | |
| |||
520 | 527 | | |
521 | 528 | | |
522 | 529 | | |
523 | | - | |
524 | | - | |
525 | | - | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
526 | 536 | | |
527 | 537 | | |
528 | 538 | | |
| |||
0 commit comments