Skip to content

Commit

Permalink
Merge pull request #3381 from marta-lokhova/loadgen_recovery
Browse files Browse the repository at this point in the history
Loadgen: better recovery for dropped transactions

Reviewed-by: MonsieurNicolas
  • Loading branch information
latobarita authored Mar 21, 2022
2 parents d387c6a + bb3a708 commit 22c84a7
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/simulation/LoadGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -493,11 +493,7 @@ LoadGenerator::pickAccountPair(uint32_t numAccounts, uint32_t offset,
{
auto sourceAccount = findAccount(sourceAccountId, ledgerNum);

// Mod with total number of accounts to ensure account exists
uint64_t destAccountId =
(sourceAccountId + sourceAccount->getLastSequenceNumber()) %
numAccounts +
offset;
auto destAccountId = rand_uniform<uint64_t>(0, numAccounts - 1) + offset;

auto destAccount = findAccount(destAccountId, ledgerNum);

Expand Down

0 comments on commit 22c84a7

Please sign in to comment.