Fail loadgen when pending accounts are found in available accounts list #4372
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Although
mAccountsAvailable
shouldn't contain pending accounts, it is possible when the network is overloaded. Consider the following scenario:t
using accounta
and broadcasts it on. In doing so, loadgen marksa
as in use, removing it from `mAccountsAvailable.t
never makes it out of the queue and the node bans it.t
because bans only last for so many ledgers.a
available, moving it back intomAccountsAvailable
.t
again on the network and (as it is no longer banned) adds it back to the queuea
frommAccountsAvailable
. However,a
is no longer available ast
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
clang-format
v8.0.0 (viamake format
or the Visual Studio extension)