Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: prioritize higher nonces in the message processor (#4921)
### Description Noticed that the iteration logic doesn't actually prioritize higher nonces. See these example logs https://cloudlogging.app.goo.gl/CAosszzjFzi3uNJM6 when I sent a message right after a relayer restart -- it wouldn't move forward on the high iterator despite there being an unprocessable message on the high iterator, as it was preferring to iterate the low nonce iter through all the processed messages (down to nonce 0). This meant it took a really long time for my message to get relayed! With this new logic, we should see upon startup we actually do prioritize new messages, not just high nonce messages from before the time of restart. Would also be open to maybe moving forward the low and high iter at the same time, but that is a bigger change so I'll leave it like this for now ### Drive-by changes <!-- Are there any minor or drive-by changes also included? --> ### Related issues <!-- - Fixes #[issue number here] --> ### Backward compatibility <!-- Are these changes backward compatible? Are there any infrastructure implications, e.g. changes that would prohibit deploying older commits using this infra tooling? Yes/No --> ### Testing <!-- What kind of testing have these changes undergone? None/Manual/Unit Tests -->
- Loading branch information