Skip to content

Commit

Permalink
Attempt to future-proof the tie breaking test
Browse files Browse the repository at this point in the history
  • Loading branch information
ximinez committed Feb 25, 2022
1 parent edcac31 commit fdfa7c9
Show file tree
Hide file tree
Showing 5 changed files with 178 additions and 59 deletions.
4 changes: 2 additions & 2 deletions src/ripple/app/misc/TxQ.h
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ class TxQ
in the queue.
*/
std::vector<TxDetails>
getAccountTxs(AccountID const& account, ReadView const& view) const;
getAccountTxs(AccountID const& account) const;

/** Returns information about all transactions currently
in the queue.
Expand All @@ -349,7 +349,7 @@ class TxQ
in the queue.
*/
std::vector<TxDetails>
getTxs(ReadView const& view) const;
getTxs() const;

/** Summarize current fee metrics for the `fee` RPC command.
Expand Down
4 changes: 2 additions & 2 deletions src/ripple/app/misc/impl/TxQ.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1740,7 +1740,7 @@ TxQ::getTxRequiredFeeAndSeq(
}

std::vector<TxQ::TxDetails>
TxQ::getAccountTxs(AccountID const& account, ReadView const& view) const
TxQ::getAccountTxs(AccountID const& account) const
{
std::vector<TxDetails> result;

Expand All @@ -1761,7 +1761,7 @@ TxQ::getAccountTxs(AccountID const& account, ReadView const& view) const
}

std::vector<TxQ::TxDetails>
TxQ::getTxs(ReadView const& view) const
TxQ::getTxs() const
{
std::vector<TxDetails> result;

Expand Down
5 changes: 2 additions & 3 deletions src/ripple/rpc/handlers/AccountInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,7 @@ doAccountInfo(RPC::JsonContext& context)
{
Json::Value jvQueueData = Json::objectValue;

auto const txs =
context.app.getTxQ().getAccountTxs(accountID, *ledger);
auto const txs = context.app.getTxQ().getAccountTxs(accountID);
if (!txs.empty())
{
jvQueueData[jss::txn_count] =
Expand Down Expand Up @@ -298,7 +297,7 @@ doAccountInfoGrpc(
return {result, errorStatus};
}
std::vector<TxQ::TxDetails> const txs =
context.app.getTxQ().getAccountTxs(accountID, *ledger);
context.app.getTxQ().getAccountTxs(accountID);
org::xrpl::rpc::v1::QueueData& queueData =
*result.mutable_queue_data();
RPC::convert(queueData, txs);
Expand Down
2 changes: 1 addition & 1 deletion src/ripple/rpc/handlers/LedgerHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ LedgerHandler::check()
return rpcINVALID_PARAMS;
}

queueTxs_ = context_.app.getTxQ().getTxs(*ledger_);
queueTxs_ = context_.app.getTxQ().getTxs();
}

return Status::OK;
Expand Down
Loading

0 comments on commit fdfa7c9

Please sign in to comment.