mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
AccountSet set/clear, asfDefaultRipple = 8 AccountRoot flag, lsfDefaultRipple = 0x00800000 In trustCreate, set no ripple flag if appropriate. If an account does not have the default ripple flag set, new ripple lines created as a result of its offers being taken or people creating trust lines to it have no ripple set by that account's side automatically Trust lines can be deleted if the no ripple flag matches its default setting based on the account's default ripple setting. Fix default no-rippling in integration tests.
95 lines
3.9 KiB
C++
95 lines
3.9 KiB
C++
//------------------------------------------------------------------------------
|
|
/*
|
|
This file is part of rippled: https://github.com/ripple/rippled
|
|
Copyright (c) 2012, 2013 Ripple Labs Inc.
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
purpose with or without fee is hereby granted, provided that the above
|
|
copyright notice and this permission notice appear in all copies.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
*/
|
|
//==============================================================================
|
|
|
|
#ifndef RIPPLE_PROTOCOL_TXFLAGS_H_INCLUDED
|
|
#define RIPPLE_PROTOCOL_TXFLAGS_H_INCLUDED
|
|
|
|
namespace ripple {
|
|
|
|
//
|
|
// Transaction flags.
|
|
//
|
|
|
|
/** Transaction flags.
|
|
|
|
These flags modify the behavior of an operation.
|
|
|
|
@note Changing these will create a hard fork
|
|
@ingroup protocol
|
|
*/
|
|
class TxFlag
|
|
{
|
|
public:
|
|
static std::uint32_t const requireDestTag = 0x00010000;
|
|
};
|
|
// VFALCO TODO Move all flags into this container after some study.
|
|
|
|
// Universal Transaction flags:
|
|
const std::uint32_t tfFullyCanonicalSig = 0x80000000;
|
|
const std::uint32_t tfUniversal = tfFullyCanonicalSig;
|
|
const std::uint32_t tfUniversalMask = ~ tfUniversal;
|
|
|
|
// AccountSet flags:
|
|
// VFALCO TODO Javadoc comment every one of these constants
|
|
//const std::uint32_t TxFlag::requireDestTag = 0x00010000;
|
|
const std::uint32_t tfOptionalDestTag = 0x00020000;
|
|
const std::uint32_t tfRequireAuth = 0x00040000;
|
|
const std::uint32_t tfOptionalAuth = 0x00080000;
|
|
const std::uint32_t tfDisallowXRP = 0x00100000;
|
|
const std::uint32_t tfAllowXRP = 0x00200000;
|
|
const std::uint32_t tfAccountSetMask = ~ (tfUniversal | TxFlag::requireDestTag | tfOptionalDestTag
|
|
| tfRequireAuth | tfOptionalAuth
|
|
| tfDisallowXRP | tfAllowXRP);
|
|
|
|
// AccountSet SetFlag/ClearFlag values
|
|
const std::uint32_t asfRequireDest = 1;
|
|
const std::uint32_t asfRequireAuth = 2;
|
|
const std::uint32_t asfDisallowXRP = 3;
|
|
const std::uint32_t asfDisableMaster = 4;
|
|
const std::uint32_t asfAccountTxnID = 5;
|
|
const std::uint32_t asfNoFreeze = 6;
|
|
const std::uint32_t asfGlobalFreeze = 7;
|
|
const std::uint32_t asfDefaultRipple = 8;
|
|
|
|
// OfferCreate flags:
|
|
const std::uint32_t tfPassive = 0x00010000;
|
|
const std::uint32_t tfImmediateOrCancel = 0x00020000;
|
|
const std::uint32_t tfFillOrKill = 0x00040000;
|
|
const std::uint32_t tfSell = 0x00080000;
|
|
const std::uint32_t tfOfferCreateMask = ~ (tfUniversal | tfPassive | tfImmediateOrCancel | tfFillOrKill | tfSell);
|
|
|
|
// Payment flags:
|
|
const std::uint32_t tfNoRippleDirect = 0x00010000;
|
|
const std::uint32_t tfPartialPayment = 0x00020000;
|
|
const std::uint32_t tfLimitQuality = 0x00040000;
|
|
const std::uint32_t tfPaymentMask = ~ (tfUniversal | tfPartialPayment | tfLimitQuality | tfNoRippleDirect);
|
|
|
|
// TrustSet flags:
|
|
const std::uint32_t tfSetfAuth = 0x00010000;
|
|
const std::uint32_t tfSetNoRipple = 0x00020000;
|
|
const std::uint32_t tfClearNoRipple = 0x00040000;
|
|
const std::uint32_t tfSetFreeze = 0x00100000;
|
|
const std::uint32_t tfClearFreeze = 0x00200000;
|
|
const std::uint32_t tfTrustSetMask = ~ (tfUniversal | tfSetfAuth | tfSetNoRipple | tfClearNoRipple
|
|
| tfSetFreeze | tfClearFreeze);
|
|
|
|
} // ripple
|
|
|
|
#endif
|