alchemistcoin / sandwiched-backend

GNU General Public License v3.0
25 stars 7 forks source link

Promise pool #1

Open henridf opened 3 years ago

henridf commented 3 years ago

We currently iterate synchronously through the requested EOA's list of swaps , making one JSON-RPC getLogs request for each swap (we then search those logs for sandwiches around that swap).

These getLogs should be made concurrently. A Promise.all() might result in too many concurrent requests; something like https://github.com/timdp/es6-promise-pool seems like a good solution.