Quake Wang
Quake Wang
> @eval-exec @quake I was wondering, what's stopping someone from launching DDoS on conflicted txs? What are the countermeasures in place? there is a limit for conflicted txs lru cache:...
Returning None when a timeout occurs will cause the outer code to interpret the iteration as having completed normally. This can lead to incomplete results being processed or reported. To...
one timeout field should be enough: ``` struct TimeoutIterator { inner: I, timeout: Instant, } fn next(&mut self) -> Option { if Instant::now() > self.timeout{ return Some(Err(TimeoutError)); } ```
you may using iter.map(|res| res?) to adapt an iterator that returns Result into a form that can be used with standard iterator adapters like take_while or filter_map. The main advantage...
> > you may using iter.map(|res| res?) to adapt an iterator that returns Result into a form > > Internally, the iterator cannot directly return to the function `error`. If...