From 20c95a5ba4c6b95d09c65f99c56425d5a5f62bfd Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Mon, 5 Aug 2013 01:24:52 -0700 Subject: [PATCH] Issuer can always trade on his own order book -- he can't contaminate his infinite funds. --- src/cpp/ripple/ripple_RippleCalc.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cpp/ripple/ripple_RippleCalc.cpp b/src/cpp/ripple/ripple_RippleCalc.cpp index 6635ba05b4..044bd27cf3 100644 --- a/src/cpp/ripple/ripple_RippleCalc.cpp +++ b/src/cpp/ripple/ripple_RippleCalc.cpp @@ -237,7 +237,7 @@ TER RippleCalc::calcNodeAdvance ( // Only a allow a source to be used once, in the first node encountered from initial path scan. // This prevents conflicting uses of the same balance when going reverse vs forward. - if (bFoundForward && itForward->second != uNode) + if (bFoundForward && (itForward->second != uNode) && (uOfrOwnerID != uCurIssuerID)) { // Temporarily unfunded. Another node uses this source, ignore in this offer. WriteLog (lsTRACE, RippleCalc) << "calcNodeAdvance: temporarily unfunded offer (forward)"; @@ -250,7 +250,7 @@ TER RippleCalc::calcNodeAdvance ( // For this quality increment, only allow a source to be used from a single node, in the first node encountered from applying offers // in reverse. - if (bFoundReverse && itReverse->second != uNode) + if (bFoundReverse && (itReverse->second != uNode) && (uOfrOwnerID != uCurIssuerID)) { // Temporarily unfunded. Another node uses this source, ignore in this offer. WriteLog (lsTRACE, RippleCalc) << "calcNodeAdvance: temporarily unfunded offer (reverse)";