Issuer can always trade on his own order book -- he can't contaminate his infinite funds.

This commit is contained in:
JoelKatz
2013-08-05 01:24:52 -07:00
committed by David Schwartz
parent 9dd6b7c408
commit 20c95a5ba4

View File

@@ -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)";