Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(builder): only reset sleep future when it has elapsed (#63)
* fix(builder): only reset sleep future when it has elapsed Right now, when spawning the block builder task, we're spawning the sleep future inside the loop. This means that any of the two `select!` branches will re-set the sleep timer. This is particularly bad on the branch that receives txs: It means that if we constantly received txs in between the incoming transactions buffer, the first branch would never trigger, as it requires the sleep future to elapse, therefore never building a block. This would effectively DDoS the builder. Fixes ENG-609 * fix: moved pin to heap from stack to avoid lifetime issues * chore: docs
- Loading branch information