Closed sideninja closed 3 months ago
The recent changes improve the transaction handling mechanisms across various components of the system, emphasizing a more integrated approach. Key modifications include refining the types used in transaction processing, streamlining the event ingestion engine, and enhancing the transaction pool for better publishing of events. These updates collectively enhance clarity, efficiency, and the overall capability of transaction management within the application.
File | Change Summary |
---|---|
api/stream.go |
Modified NewPendingTransactions to change data type from models.Transaction to *gethTypes.Transaction , simplifying control flow. |
bootstrap/bootstrap.go |
Removed transactionsPublisher from startIngestion and initialized txPool in startServer , enhancing transaction management integration. |
services/ingestion/engine.go |
Removed transactionsPublisher from Engine struct, simplifying event processing logic and modifying the processEvents method. |
services/ingestion/engine_test.go |
Simplified test cases by reducing instances of models.NewPublisher() , maintaining functionality while lowering complexity. |
services/requester/pool.go |
Added txPublisher field to TxPool , updated NewTxPool to include it, and modified Send method to publish transactions. |
services/requester/requester.go |
Updated NewEVM to accept a txPool parameter, improving flexibility in transaction pool management. |
sequenceDiagram
participant API
participant TxPool
participant EVM
participant Engine
API->>TxPool: Publish transaction
TxPool->>EVM: Pass transaction for processing
EVM->>Engine: Notify about the processing
Engine-->>TxPool: Acknowledge receipt
π In the meadow where changes bloom,
Transactions dance in a new room.
With a hop and a skip, they find their way,
Simplified paths for a brighter day!
So letβs cheer for the code's sweet tune,
A rabbit's joy beneath the moon! πβ¨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Description
Changes the pending transaction event source to the pool. This is the correct way to emit pending transactions, not like before once they were already ingested as executed.
For contributor use:
master
branchFiles changed
in the Github PR explorerSummary by CodeRabbit
New Features
Bug Fixes
NewPendingTransactions
method for better performance and clarity.Refactor
Tests