Skip to content

Commit

Permalink
Fix clang format, Windows build, AMM test debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
gregtatcam committed Feb 5, 2024
1 parent e72d588 commit 91f20bc
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 19 deletions.
3 changes: 1 addition & 2 deletions src/ripple/app/paths/impl/MPTEndpointStep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,7 @@ class DirectMPTPaymentStep : public MPTEndpointStep<DirectMPTPaymentStep>
using MPTEndpointStep<DirectMPTPaymentStep>::MPTEndpointStep;
using MPTEndpointStep<DirectMPTPaymentStep>::check;

bool
verifyPrevStepDebtDirection(DebtDirection) const
bool verifyPrevStepDebtDirection(DebtDirection) const
{
// A payment doesn't care whether or not prevStepRedeems.
return true;
Expand Down
2 changes: 2 additions & 0 deletions src/ripple/app/paths/impl/PaySteps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -701,5 +701,7 @@ template bool
isDirectXrpToXrp<IOUAmount, XRPAmount>(Strand const& strand);
template bool
isDirectXrpToXrp<IOUAmount, IOUAmount>(Strand const& strand);
template bool
isDirectXrpToXrp<MPTAmount, MPTAmount>(Strand const& strand);

} // namespace ripple
5 changes: 2 additions & 3 deletions src/ripple/app/tx/impl/Payment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,8 @@ Payment::preflight(PreflightContext const& ctx)
if (bXRPDirect && partialPaymentAllowed)
{
// Consistent but redundant transaction.
JLOG(j.trace())
<< "Malformed transaction: "
<< "Partial payment specified for XRP to XRP.";
JLOG(j.trace()) << "Malformed transaction: "
<< "Partial payment specified for XRP to XRP.";
return temBAD_SEND_PARTIAL;
}
if (bDirect && limitQuality)
Expand Down
6 changes: 3 additions & 3 deletions src/ripple/protocol/Asset.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,15 @@ class Asset
}

template <typename T>
requires(std::is_same_v<T, Currency> || std::is_same_v<T, MPT>)
requires(std::is_same_v<T, Currency> || std::is_same_v<T, MPT>)
T const* get() const
{
return std::get_if<T>(asset_);
}

operator Currency const&() const;
operator Currency const &() const;

operator MPT const&() const;
operator MPT const &() const;

friend constexpr bool
comparable(Asset const& a1, Asset const& a2)
Expand Down
12 changes: 1 addition & 11 deletions src/test/app/AMM_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4820,17 +4820,7 @@ struct AMM_test : public jtx::AMMTest
void
run() override
{
//testCore();
using namespace jtx;
Env env(*this);
fund(env, gw, {alice, bob}, {USD(1'000)}, Fund::All);
env(rate(gw, 1.25));
env.close();
env(pay(alice, bob, USD(100)), sendmax(USD(125)), txflags(tfPartialPayment));
env.close();
std::cout << env.balance(gw, USD) << std::endl;
std::cout << env.balance(alice, USD) << std::endl;
std::cout << env.balance(bob, USD) << std::endl;
testCore();
}
};

Expand Down

0 comments on commit 91f20bc

Please sign in to comment.