Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hotfix 0.25.2-rc applied to 0.25.1 Detect paths bridging offers to order... #384

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Builds/rpm/rippled.spec
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: rippled
Version: 0.25.1
Version: 0.25.2-rc1
Release: 1%{?dist}
Summary: Ripple peer-to-peer network daemon

Expand Down
18 changes: 11 additions & 7 deletions src/ripple_app/paths/PathState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -354,24 +354,28 @@ TER PathState::pushNode (
pnCur.saRevDeliver = STAmount (pnCur.uCurrencyID, pnCur.uIssuerID);
pnCur.saFwdDeliver = pnCur.saRevDeliver;

if (!!pnCur.uCurrencyID != !!pnCur.uIssuerID)
if (pnCur.uCurrencyID.isZero() != pnCur.uIssuerID.isZero())
{
WriteLog (lsDEBUG, RippleCalc) << "pushNode: currency is inconsistent with issuer.";

WriteLog (lsDEBUG, RippleCalc) <<
"pushNode: currency is inconsistent with issuer.";
terResult = temBAD_PATH;
}
else if (!!pnPrv.uAccountID)
else if (pnPrv.uCurrencyID == pnCur.uCurrencyID &&
pnPrv.uIssuerID == pnCur.uIssuerID)
{
WriteLog (lsDEBUG, RippleCalc) <<
"pushNode: bad path: offer to same currency and issuer";
terResult = temBAD_PATH;
}
else
{
// Previous is an account.
WriteLog (lsTRACE, RippleCalc) << "pushNode: imply for offer.";

// Insert intermediary issuer account if needed.
terResult = pushImply (
ACCOUNT_XRP, // Rippling, but offers don't have an account.
pnPrv.uCurrencyID,
pnPrv.uIssuerID);
}

if (tesSUCCESS == terResult)
{
vpnNodes.push_back (pnCur);
Expand Down
2 changes: 1 addition & 1 deletion src/ripple_data/protocol/BuildInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ char const* BuildInfo::getRawVersionString ()
//
// The build version number (edit this for each release)
//
"0.25.1"
"0.25.2-rc1"
//
// Must follow the format described here:
//
Expand Down