diff --git a/src/ripple_app/paths/RippleState.h b/src/ripple_app/paths/RippleState.h index 2f6867afbd..bdf89949b0 100644 --- a/src/ripple_app/paths/RippleState.h +++ b/src/ripple_app/paths/RippleState.h @@ -52,6 +52,16 @@ public: return isSetBit (mFlags, !mViewLowest ? lsfLowAuth : lsfHighAuth); } + bool getNoRipple () const + { + return isSetBit (mFlags, mViewLowest ? lsfLowNoRipple : lsfHighNoRipple); + } + + bool getNoRipplePeer () const + { + return isSetBit (mFlags, !mViewLowest ? lsfLowNoRipple : lsfHighNoRipple); + } + const STAmount& getBalance () const { return mBalance; diff --git a/src/ripple_app/rpc/RPCHandler.cpp b/src/ripple_app/rpc/RPCHandler.cpp index 3911ebdf93..3d0765a762 100644 --- a/src/ripple_app/rpc/RPCHandler.cpp +++ b/src/ripple_app/rpc/RPCHandler.cpp @@ -1109,6 +1109,10 @@ Json::Value RPCHandler::doAccountLines (Json::Value params, LoadType* loadType, jPeer["authorized"] = true; if (line->getAuthPeer()) jPeer["peer_authorized"] = true; + if (line->getNoRipple()) + jPeer["no_ripple"] = true; + if (line->getNoRipplePeer()) + jPeer["no_ripple_peer"] = true; } } diff --git a/src/ripple_app/tx/TrustSetTransactor.cpp b/src/ripple_app/tx/TrustSetTransactor.cpp index 5cbb2719c5..fb7e5f77a4 100644 --- a/src/ripple_app/tx/TrustSetTransactor.cpp +++ b/src/ripple_app/tx/TrustSetTransactor.cpp @@ -40,6 +40,8 @@ TER TrustSetTransactor::doApply () } const bool bSetAuth = isSetBit (uTxFlags, tfSetfAuth); + const bool bSetNoRipple = isSetBit (uTxFlags, tfSetNoRipple); + const bool bClearNoRipple = isSetBit (uTxFlags, tfClearNoRipple); if (bSetAuth && !isSetBit (mTxnAccount->getFieldU32 (sfFlags), lsfRequireAuth)) { @@ -227,6 +229,15 @@ TER TrustSetTransactor::doApply () uFlagsOut |= (bHigh ? lsfHighAuth : lsfLowAuth); } + if (bSetNoRipple && !bClearNoRipple) + { + uFlagsOut |= (bHigh ? lsfHighNoRipple : lsfLowNoRipple); + } + else if (bClearNoRipple && !bSetNoRipple) + { + uFlagsOut &= ~(bHigh ? lsfHighNoRipple : lsfLowNoRipple); + } + if (bLowReserveSet && !bLowReserved) { // Set reserve for low account. diff --git a/src/ripple_data/protocol/LedgerFormats.h b/src/ripple_data/protocol/LedgerFormats.h index 8160db3248..1c3877df4f 100644 --- a/src/ripple_data/protocol/LedgerFormats.h +++ b/src/ripple_data/protocol/LedgerFormats.h @@ -86,7 +86,7 @@ enum LedgerSpecificFlags lsfRequireDestTag = 0x00020000, // True, to require a DestinationTag for payments. lsfRequireAuth = 0x00040000, // True, to require a authorization to hold IOUs. lsfDisallowXRP = 0x00080000, // True, to disallow sending XRP. - lsfDisableMaster = 0x00100000, // True, force regular key + lsfDisableMaster = 0x00100000, // True, force regular key // ltOFFER lsfPassive = 0x00010000, @@ -97,6 +97,8 @@ enum LedgerSpecificFlags lsfHighReserve = 0x00020000, lsfLowAuth = 0x00040000, lsfHighAuth = 0x00080000, + lsfLowNoRipple = 0x00100000, + lsfHighNoRipple = 0x00200000, }; //------------------------------------------------------------------------------ diff --git a/src/ripple_data/protocol/TxFlags.h b/src/ripple_data/protocol/TxFlags.h index a8f2a615be..f7d504e2a0 100644 --- a/src/ripple_data/protocol/TxFlags.h +++ b/src/ripple_data/protocol/TxFlags.h @@ -58,6 +58,8 @@ const uint32 tfPaymentMask = ~ (tfPartialPayment | tfLimitQuality | tfN // TrustSet flags: const uint32 tfSetfAuth = 0x00010000; -const uint32 tfTrustSetMask = ~ (tfSetfAuth); +const uint32 tfSetNoRipple = 0x00020000; +const uint32 tfClearNoRipple = 0x00040000; +const uint32 tfTrustSetMask = ~ (tfSetfAuth | tfSetNoRipple | tfClearNoRipple); #endif