Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
mtrippled committed Jan 1, 2018
1 parent f084708 commit 6ce97a0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
24 changes: 13 additions & 11 deletions src/ripple/app/misc/impl/AccountTxPaging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,19 +202,10 @@ accountTxPage (

st.execute ();

std::cerr << "TEST while start findLedger, findSeq: " << findLedger << ", " << findSeq << "\n";
while (st.fetch ())
{
// This works around difficulty optimizing an SQLite query.
if (filter)
{
if (findLedger == ledgerSeq.value_or (0) &&
findSeq > txnSeq.value_or (0))
{
continue;
}
filter = false;
}

std::cerr << "TEST VALS: " << ledgerSeq.value_or (0) << ", " << txnSeq.value_or (0) << "\n";
if (lookingForMarker)
{
if (findLedger == ledgerSeq.value_or (0) &&
Expand Down Expand Up @@ -243,6 +234,16 @@ accountTxPage (
else
rawMeta.clear ();

// This works around difficulty optimizing an SQLite query.
// if (filter)
// {
// if (findLedger == ledgerSeq.value_or (0) &&
// findSeq > txnSeq.value_or (0))
// {
// continue;
// }
// filter = false;
// }
// Work around a bug that could leave the metadata missing
if (rawMeta.size() == 0)
onUnsavedLedger(ledgerSeq.value_or (0));
Expand All @@ -252,6 +253,7 @@ accountTxPage (
--numberOfResults;
}
}
std::cerr << "TEST while end\n";
}

return;
Expand Down
1 change: 1 addition & 0 deletions src/test/app/AccountTxPaging_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ class AccountTxPaging_test : public beast::unit_test::suite

jrr = next(env, A3, 2, 5, 2, true, jrr[jss::marker]);
txs = jrr[jss::transactions];
std::cerr << "TEST: " << txs.isArray() << ", " << txs.size() << "\n";
if (! BEAST_EXPECT(txs.isArray() && txs.size() == 2))
return;
BEAST_EXPECT(checkTransaction (txs[0u], 2, 4));
Expand Down

0 comments on commit 6ce97a0

Please sign in to comment.