aquarius
aquarius copied to clipboard
Refactor block loop
The current block processing loop is having a lot of issues because:
- uses unnecessary web3 calls when splitting in blocks (what if OrderStarted passes, but ExchangeCreated fails? it will split the chunk in two, and use two additional calls again for OrderStarted, which worked fine)
- the events are not processed in the right order (blockchain order), but a hardcoded order, which may lead into issues (assets not existing when transfer is detected, etc)
Proposal:
- refactor loop