Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fail loadgen when pending accounts are found in available accounts li…
…st (#4372) # Description Although `mAccountsAvailable` shouldn't contain pending accounts, it is possible when the network is overloaded. Consider the following scenario: 1. A node generates a transaction `t` using account `a` and broadcasts it on. In doing so, loadgen marks `a` as in use, removing it from `mAccountsAvailable. 2. For whatever reason, `t` never makes it out of the queue and the node bans it. 3. After some period of time, the node unbans `t` because bans only last for so many ledgers. 4. Loadgen marks `a` available, moving it back into `mAccountsAvailable`. 5. The node hears about `t` again on the network and (as it is no longer banned) adds it back to the queue 6. getNextAvailableAccount draws `a` from `mAccountsAvailable`. However, `a` is no longer available as `t` is in the transaction queue! In this scenario, returning `a` results in an assertion failure later. This change instead detects this and marks the loadgen run as failed. # Checklist - [x] Reviewed the [contributing](https://github.com/stellar/stellar-core/blob/master/CONTRIBUTING.md#submitting-changes) document - [x] Rebased on top of master (no merge commits) - [x] Ran `clang-format` v8.0.0 (via `make format` or the Visual Studio extension) - [x] Compiles - [x] Ran all tests - [ ] If change impacts performance, include supporting evidence per the [performance document](https://github.com/stellar/stellar-core/blob/master/performance-eval/performance-eval.md)
- Loading branch information