rippled
Change.cpp
1 //------------------------------------------------------------------------------
2 /*
3  This file is part of rippled: https://github.com/ripple/rippled
4  Copyright (c) 2012, 2013 Ripple Labs Inc.
5 
6  Permission to use, copy, modify, and/or distribute this software for any
7  purpose with or without fee is hereby granted, provided that the above
8  copyright notice and this permission notice appear in all copies.
9 
10  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11  WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12  MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13  ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14  WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15  ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16  OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 */
18 //==============================================================================
19 
20 #include <ripple/app/ledger/Ledger.h>
21 #include <ripple/app/main/Application.h>
22 #include <ripple/app/misc/AmendmentTable.h>
23 #include <ripple/app/misc/NetworkOPs.h>
24 #include <ripple/app/tx/impl/Change.h>
25 #include <ripple/basics/Log.h>
26 #include <ripple/ledger/Sandbox.h>
27 #include <ripple/protocol/Feature.h>
28 #include <ripple/protocol/Indexes.h>
29 #include <ripple/protocol/TxFlags.h>
30 #include <string_view>
31 
32 namespace ripple {
33 
34 NotTEC
36 {
37  auto const ret = preflight0(ctx);
38  if (!isTesSuccess(ret))
39  return ret;
40 
41  auto account = ctx.tx.getAccountID(sfAccount);
42  if (account != beast::zero)
43  {
44  JLOG(ctx.j.warn()) << "Change: Bad source id";
45  return temBAD_SRC_ACCOUNT;
46  }
47 
48  // No point in going any further if the transaction fee is malformed.
49  auto const fee = ctx.tx.getFieldAmount(sfFee);
50  if (!fee.native() || fee != beast::zero)
51  {
52  JLOG(ctx.j.warn()) << "Change: invalid fee";
53  return temBAD_FEE;
54  }
55 
56  if (!ctx.tx.getSigningPubKey().empty() || !ctx.tx.getSignature().empty() ||
58  {
59  JLOG(ctx.j.warn()) << "Change: Bad signature";
60  return temBAD_SIGNATURE;
61  }
62 
63  if (ctx.tx.getFieldU32(sfSequence) != 0 ||
65  {
66  JLOG(ctx.j.warn()) << "Change: Bad sequence";
67  return temBAD_SEQUENCE;
68  }
69 
70  if (ctx.tx.getTxnType() == ttUNL_MODIFY &&
72  {
73  JLOG(ctx.j.warn()) << "Change: NegativeUNL not enabled";
74  return temDISABLED;
75  }
76 
77  return tesSUCCESS;
78 }
79 
80 TER
82 {
83  // If tapOPEN_LEDGER is resurrected into ApplyFlags,
84  // this block can be moved to preflight.
85  if (ctx.view.open())
86  {
87  JLOG(ctx.j.warn()) << "Change transaction against open ledger";
88  return temINVALID;
89  }
90 
91  switch (ctx.tx.getTxnType())
92  {
93  case ttAMENDMENT:
94  case ttFEE:
95  case ttUNL_MODIFY:
96  return tesSUCCESS;
97  default:
98  return temUNKNOWN;
99  }
100 }
101 
102 TER
104 {
105  switch (ctx_.tx.getTxnType())
106  {
107  case ttAMENDMENT:
108  return applyAmendment();
109  case ttFEE:
110  return applyFee();
111  case ttUNL_MODIFY:
112  return applyUNLModify();
113  default:
114  assert(0);
115  return tefFAILURE;
116  }
117 }
118 
119 void
121 {
122  assert(account_ == beast::zero);
123 }
124 
125 void
127 {
128  JLOG(j_.warn()) << "fixTrustLinesToSelf amendment activation code starting";
129 
130  auto removeTrustLineToSelf = [this](Sandbox& sb, uint256 id) {
131  auto tl = sb.peek(keylet::child(id));
132 
133  if (tl == nullptr)
134  {
135  JLOG(j_.warn()) << id << ": Unable to locate trustline";
136  return true;
137  }
138 
139  if (tl->getType() != ltRIPPLE_STATE)
140  {
141  JLOG(j_.warn()) << id << ": Unexpected type "
142  << static_cast<std::uint16_t>(tl->getType());
143  return true;
144  }
145 
146  auto const& lo = tl->getFieldAmount(sfLowLimit);
147  auto const& hi = tl->getFieldAmount(sfHighLimit);
148 
149  if (lo != hi)
150  {
151  JLOG(j_.warn()) << id << ": Trustline doesn't meet requirements";
152  return true;
153  }
154 
155  if (auto const page = tl->getFieldU64(sfLowNode); !sb.dirRemove(
156  keylet::ownerDir(lo.getIssuer()), page, tl->key(), false))
157  {
158  JLOG(j_.error()) << id << ": failed to remove low entry from "
159  << toBase58(lo.getIssuer()) << ":" << page
160  << " owner directory";
161  return false;
162  }
163 
164  if (auto const page = tl->getFieldU64(sfHighNode); !sb.dirRemove(
165  keylet::ownerDir(hi.getIssuer()), page, tl->key(), false))
166  {
167  JLOG(j_.error()) << id << ": failed to remove high entry from "
168  << toBase58(hi.getIssuer()) << ":" << page
169  << " owner directory";
170  return false;
171  }
172 
173  if (tl->getFlags() & lsfLowReserve)
175  sb, sb.peek(keylet::account(lo.getIssuer())), -1, j_);
176 
177  if (tl->getFlags() & lsfHighReserve)
179  sb, sb.peek(keylet::account(hi.getIssuer())), -1, j_);
180 
181  sb.erase(tl);
182 
183  JLOG(j_.warn()) << "Successfully deleted trustline " << id;
184 
185  return true;
186  };
187 
188  using namespace std::literals;
189 
190  Sandbox sb(&view());
191 
192  if (removeTrustLineToSelf(
193  sb,
194  uint256{
195  "2F8F21EFCAFD7ACFB07D5BB04F0D2E18587820C7611305BB674A64EAB0FA71E1"sv}) &&
196  removeTrustLineToSelf(
197  sb,
198  uint256{
199  "326035D5C0560A9DA8636545DD5A1B0DFCFF63E68D491B5522B767BB00564B1A"sv}))
200  {
201  JLOG(j_.warn()) << "fixTrustLinesToSelf amendment activation code "
202  "executed successfully";
203  sb.apply(ctx_.rawView());
204  }
205 }
206 
207 TER
209 {
210  uint256 amendment(ctx_.tx.getFieldH256(sfAmendment));
211 
212  auto const k = keylet::amendments();
213 
214  SLE::pointer amendmentObject = view().peek(k);
215 
216  if (!amendmentObject)
217  {
218  amendmentObject = std::make_shared<SLE>(k);
219  view().insert(amendmentObject);
220  }
221 
222  STVector256 amendments = amendmentObject->getFieldV256(sfAmendments);
223 
224  if (std::find(amendments.begin(), amendments.end(), amendment) !=
225  amendments.end())
226  return tefALREADY;
227 
228  auto flags = ctx_.tx.getFlags();
229 
230  const bool gotMajority = (flags & tfGotMajority) != 0;
231  const bool lostMajority = (flags & tfLostMajority) != 0;
232 
233  if (gotMajority && lostMajority)
234  return temINVALID_FLAG;
235 
236  STArray newMajorities(sfMajorities);
237 
238  bool found = false;
239  if (amendmentObject->isFieldPresent(sfMajorities))
240  {
241  const STArray& oldMajorities =
242  amendmentObject->getFieldArray(sfMajorities);
243  for (auto const& majority : oldMajorities)
244  {
245  if (majority.getFieldH256(sfAmendment) == amendment)
246  {
247  if (gotMajority)
248  return tefALREADY;
249  found = true;
250  }
251  else
252  {
253  // pass through
254  newMajorities.push_back(majority);
255  }
256  }
257  }
258 
259  if (!found && lostMajority)
260  return tefALREADY;
261 
262  if (gotMajority)
263  {
264  // This amendment now has a majority
265  newMajorities.push_back(STObject(sfMajority));
266  auto& entry = newMajorities.back();
267  entry.emplace_back(STUInt256(sfAmendment, amendment));
268  entry.emplace_back(STUInt32(
269  sfCloseTime, view().parentCloseTime().time_since_epoch().count()));
270 
271  if (!ctx_.app.getAmendmentTable().isSupported(amendment))
272  {
273  JLOG(j_.warn()) << "Unsupported amendment " << amendment
274  << " received a majority.";
275  }
276  }
277  else if (!lostMajority)
278  {
279  // No flags, enable amendment
280  amendments.push_back(amendment);
281  amendmentObject->setFieldV256(sfAmendments, amendments);
282 
283  if (amendment == fixTrustLinesToSelf)
285 
286  ctx_.app.getAmendmentTable().enable(amendment);
287 
288  if (!ctx_.app.getAmendmentTable().isSupported(amendment))
289  {
290  JLOG(j_.error()) << "Unsupported amendment " << amendment
291  << " activated: server blocked.";
293  }
294  }
295 
296  if (newMajorities.empty())
297  amendmentObject->makeFieldAbsent(sfMajorities);
298  else
299  amendmentObject->setFieldArray(sfMajorities, newMajorities);
300 
301  view().update(amendmentObject);
302 
303  return tesSUCCESS;
304 }
305 
306 TER
308 {
309  auto const k = keylet::fees();
310 
311  SLE::pointer feeObject = view().peek(k);
312 
313  if (!feeObject)
314  {
315  feeObject = std::make_shared<SLE>(k);
316  view().insert(feeObject);
317  }
318 
319  feeObject->setFieldU64(sfBaseFee, ctx_.tx.getFieldU64(sfBaseFee));
320  feeObject->setFieldU32(
322  feeObject->setFieldU32(sfReserveBase, ctx_.tx.getFieldU32(sfReserveBase));
323  feeObject->setFieldU32(
325 
326  view().update(feeObject);
327 
328  JLOG(j_.warn()) << "Fees have been changed";
329  return tesSUCCESS;
330 }
331 
332 TER
334 {
335  if (!isFlagLedger(view().seq()))
336  {
337  JLOG(j_.warn()) << "N-UNL: applyUNLModify, not a flag ledger, seq="
338  << view().seq();
339  return tefFAILURE;
340  }
341 
346  {
347  JLOG(j_.warn()) << "N-UNL: applyUNLModify, wrong Tx format.";
348  return tefFAILURE;
349  }
350 
351  bool const disabling = ctx_.tx.getFieldU8(sfUNLModifyDisabling);
352  auto const seq = ctx_.tx.getFieldU32(sfLedgerSequence);
353  if (seq != view().seq())
354  {
355  JLOG(j_.warn()) << "N-UNL: applyUNLModify, wrong ledger seq=" << seq;
356  return tefFAILURE;
357  }
358 
359  Blob const validator = ctx_.tx.getFieldVL(sfUNLModifyValidator);
360  if (!publicKeyType(makeSlice(validator)))
361  {
362  JLOG(j_.warn()) << "N-UNL: applyUNLModify, bad validator key";
363  return tefFAILURE;
364  }
365 
366  JLOG(j_.info()) << "N-UNL: applyUNLModify, "
367  << (disabling ? "ToDisable" : "ToReEnable")
368  << " seq=" << seq
369  << " validator data:" << strHex(validator);
370 
371  auto const k = keylet::negativeUNL();
372  SLE::pointer negUnlObject = view().peek(k);
373  if (!negUnlObject)
374  {
375  negUnlObject = std::make_shared<SLE>(k);
376  view().insert(negUnlObject);
377  }
378 
379  bool const found = [&] {
380  if (negUnlObject->isFieldPresent(sfDisabledValidators))
381  {
382  auto const& negUnl =
383  negUnlObject->getFieldArray(sfDisabledValidators);
384  for (auto const& v : negUnl)
385  {
386  if (v.isFieldPresent(sfPublicKey) &&
387  v.getFieldVL(sfPublicKey) == validator)
388  return true;
389  }
390  }
391  return false;
392  }();
393 
394  if (disabling)
395  {
396  // cannot have more than one toDisable
397  if (negUnlObject->isFieldPresent(sfValidatorToDisable))
398  {
399  JLOG(j_.warn()) << "N-UNL: applyUNLModify, already has ToDisable";
400  return tefFAILURE;
401  }
402 
403  // cannot be the same as toReEnable
404  if (negUnlObject->isFieldPresent(sfValidatorToReEnable))
405  {
406  if (negUnlObject->getFieldVL(sfValidatorToReEnable) == validator)
407  {
408  JLOG(j_.warn())
409  << "N-UNL: applyUNLModify, ToDisable is same as ToReEnable";
410  return tefFAILURE;
411  }
412  }
413 
414  // cannot be in negative UNL already
415  if (found)
416  {
417  JLOG(j_.warn())
418  << "N-UNL: applyUNLModify, ToDisable already in negative UNL";
419  return tefFAILURE;
420  }
421 
422  negUnlObject->setFieldVL(sfValidatorToDisable, validator);
423  }
424  else
425  {
426  // cannot have more than one toReEnable
427  if (negUnlObject->isFieldPresent(sfValidatorToReEnable))
428  {
429  JLOG(j_.warn()) << "N-UNL: applyUNLModify, already has ToReEnable";
430  return tefFAILURE;
431  }
432 
433  // cannot be the same as toDisable
434  if (negUnlObject->isFieldPresent(sfValidatorToDisable))
435  {
436  if (negUnlObject->getFieldVL(sfValidatorToDisable) == validator)
437  {
438  JLOG(j_.warn())
439  << "N-UNL: applyUNLModify, ToReEnable is same as ToDisable";
440  return tefFAILURE;
441  }
442  }
443 
444  // must be in negative UNL
445  if (!found)
446  {
447  JLOG(j_.warn())
448  << "N-UNL: applyUNLModify, ToReEnable is not in negative UNL";
449  return tefFAILURE;
450  }
451 
452  negUnlObject->setFieldVL(sfValidatorToReEnable, validator);
453  }
454 
455  view().update(negUnlObject);
456  return tesSUCCESS;
457 }
458 
459 } // namespace ripple
ripple::STArray::empty
bool empty() const
Definition: STArray.h:254
ripple::STTx::getTxnType
TxType getTxnType() const
Definition: STTx.h:179
ripple::tfGotMajority
constexpr std::uint32_t tfGotMajority
Definition: TxFlags.h:109
ripple::keylet::ownerDir
Keylet ownerDir(AccountID const &id) noexcept
The root page of an account's directory.
Definition: Indexes.cpp:303
ripple::isFlagLedger
bool isFlagLedger(LedgerIndex seq)
Returns true if the given ledgerIndex is a flag ledgerIndex.
Definition: Ledger.cpp:913
ripple::sfUNLModifyValidator
const SF_VL sfUNLModifyValidator
ripple::tfLostMajority
constexpr std::uint32_t tfLostMajority
Definition: TxFlags.h:110
ripple::makeSlice
std::enable_if_t< std::is_same< T, char >::value||std::is_same< T, unsigned char >::value, Slice > makeSlice(std::array< T, N > const &a)
Definition: Slice.h:241
ripple::sfReserveBase
const SF_UINT32 sfReserveBase
ripple::Change::applyUNLModify
TER applyUNLModify()
Definition: Change.cpp:333
ripple::Rules::enabled
bool enabled(uint256 const &feature) const
Returns true if a feature is enabled.
Definition: Rules.cpp:81
std::shared_ptr< STLedgerEntry >
ripple::PreclaimContext::view
ReadView const & view
Definition: Transactor.h:56
ripple::sfSigners
const SField sfSigners
ripple::keylet::amendments
Keylet const & amendments() noexcept
The index of the amendment table.
Definition: Indexes.cpp:163
ripple::PreclaimContext::j
const beast::Journal j
Definition: Transactor.h:60
ripple::ApplyView::peek
virtual std::shared_ptr< SLE > peek(Keylet const &k)=0
Prepare to modify the SLE associated with key.
ripple::sfLedgerSequence
const SF_UINT32 sfLedgerSequence
ripple::lsfLowReserve
@ lsfLowReserve
Definition: LedgerFormats.h:241
ripple::Transactor::j_
const beast::Journal j_
Definition: Transactor.h:89
ripple::isTesSuccess
bool isTesSuccess(TER x)
Definition: TER.h:594
ripple::STObject::getFieldU64
std::uint64_t getFieldU64(SField const &field) const
Definition: STObject.cpp:565
ripple::Sandbox::apply
void apply(RawView &to)
Definition: Sandbox.h:55
ripple::sfSequence
const SF_UINT32 sfSequence
ripple::Application::getAmendmentTable
virtual AmendmentTable & getAmendmentTable()=0
std::vector< unsigned char >
std::find
T find(T... args)
ripple::STUInt32
STInteger< std::uint32_t > STUInt32
Definition: STInteger.h:80
ripple::STObject::getFieldU8
unsigned char getFieldU8(SField const &field) const
Definition: STObject.cpp:547
ripple::ttFEE
@ ttFEE
This system-generated transaction type is used to update the network's fee settings.
Definition: TxFormats.h:152
ripple::toBase58
std::string toBase58(AccountID const &v)
Convert AccountID to base58 checked string.
Definition: AccountID.cpp:104
beast::Journal::warn
Stream warn() const
Definition: Journal.h:327
ripple::keylet::child
Keylet child(uint256 const &key) noexcept
Any item that can be in an owner dir.
Definition: Indexes.cpp:139
ripple::STArray::push_back
void push_back(STObject const &object)
Definition: STArray.h:212
ripple::Change::preCompute
void preCompute() override
Definition: Change.cpp:120
ripple::NetworkOPs::setAmendmentBlocked
virtual void setAmendmentBlocked()=0
ripple::ApplyView::update
virtual void update(std::shared_ptr< SLE > const &sle)=0
Indicate changes to a peeked SLE.
ripple::sfCloseTime
const SF_UINT32 sfCloseTime
ripple::ApplyContext::rawView
RawView & rawView()
Definition: ApplyContext.h:67
ripple::STObject::getFieldVL
Blob getFieldVL(SField const &field) const
Definition: STObject.cpp:595
ripple::ttAMENDMENT
@ ttAMENDMENT
This system-generated transaction type is used to update the status of the various amendments.
Definition: TxFormats.h:146
ripple::PreflightContext::j
const beast::Journal j
Definition: Transactor.h:38
ripple::Application::getOPs
virtual NetworkOPs & getOPs()=0
ripple::ApplyContext::app
Application & app
Definition: ApplyContext.h:47
ripple::STUInt256
STBitString< 256 > STUInt256
Definition: STBitString.h:86
ripple::ApplyView::dirRemove
bool dirRemove(Keylet const &directory, std::uint64_t page, uint256 const &key, bool keepRoot)
Remove an entry from a directory.
Definition: ApplyView.cpp:189
ripple::publicKeyType
std::optional< KeyType > publicKeyType(Slice const &slice)
Returns the type of public key.
Definition: PublicKey.cpp:206
ripple::sfLowNode
const SF_UINT64 sfLowNode
ripple::Keylet::key
uint256 key
Definition: Keylet.h:40
ripple::base_uint< 256 >
ripple::temINVALID_FLAG
@ temINVALID_FLAG
Definition: TER.h:106
ripple::sfLowLimit
const SF_AMOUNT sfLowLimit
ripple::preflight0
NotTEC preflight0(PreflightContext const &ctx)
Performs early sanity checks on the txid.
Definition: Transactor.cpp:41
ripple::adjustOwnerCount
void adjustOwnerCount(ApplyView &view, std::shared_ptr< SLE > const &sle, std::int32_t amount, beast::Journal j)
Adjust the owner count up or down.
Definition: View.cpp:713
ripple::ttUNL_MODIFY
@ ttUNL_MODIFY
This system-generated transaction type is used to update the network's negative UNL.
Definition: TxFormats.h:158
ripple::keylet::account
Keylet account(AccountID const &id) noexcept
AccountID root.
Definition: Indexes.cpp:133
ripple::STObject::getAccountID
AccountID getAccountID(SField const &field) const
Definition: STObject.cpp:589
ripple::sfReserveIncrement
const SF_UINT32 sfReserveIncrement
ripple::TERSubset< CanCvtToTER >
ripple::STArray
Definition: STArray.h:28
ripple::Sandbox
Discardable, editable view to a ledger.
Definition: Sandbox.h:34
ripple::temBAD_SEQUENCE
@ temBAD_SEQUENCE
Definition: TER.h:99
ripple::temBAD_SRC_ACCOUNT
@ temBAD_SRC_ACCOUNT
Definition: TER.h:101
ripple::sfValidatorToDisable
const SF_VL sfValidatorToDisable
ripple::Change::doApply
TER doApply() override
Definition: Change.cpp:103
beast::Journal::error
Stream error() const
Definition: Journal.h:333
beast::Journal::info
Stream info() const
Definition: Journal.h:321
ripple::STObject::getFlags
std::uint32_t getFlags() const
Definition: STObject.cpp:481
ripple::sfMajority
const SField sfMajority
ripple::STTx::getSigningPubKey
Blob getSigningPubKey() const
Definition: STTx.h:185
ripple::sfPreviousTxnID
const SF_UINT256 sfPreviousTxnID
std::uint16_t
ripple::sfHighLimit
const SF_AMOUNT sfHighLimit
ripple::temBAD_SIGNATURE
@ temBAD_SIGNATURE
Definition: TER.h:100
ripple::temUNKNOWN
@ temUNKNOWN
Definition: TER.h:119
ripple::tefFAILURE
@ tefFAILURE
Definition: TER.h:145
ripple::AmendmentTable::enable
virtual bool enable(uint256 const &amendment)=0
ripple::temBAD_FEE
@ temBAD_FEE
Definition: TER.h:87
ripple::fixTrustLinesToSelf
const uint256 fixTrustLinesToSelf
ripple::PreclaimContext::tx
STTx const & tx
Definition: Transactor.h:58
ripple::sfUNLModifyDisabling
const SF_UINT8 sfUNLModifyDisabling
ripple::Change::preclaim
static TER preclaim(PreclaimContext const &ctx)
Definition: Change.cpp:81
ripple::AmendmentTable::isSupported
virtual bool isSupported(uint256 const &amendment) const =0
ripple::PreclaimContext
State information when determining if a tx is likely to claim a fee.
Definition: Transactor.h:52
ripple::Change::applyAmendment
TER applyAmendment()
Definition: Change.cpp:208
ripple::sfBaseFee
const SF_UINT64 sfBaseFee
ripple::detail::ApplyViewBase::erase
void erase(std::shared_ptr< SLE > const &sle) override
Remove a peeked SLE.
Definition: ApplyViewBase.cpp:134
ripple::STObject::emplace_back
std::size_t emplace_back(Args &&... args)
Definition: STObject.h:907
ripple::Change::preflight
static NotTEC preflight(PreflightContext const &ctx)
Definition: Change.cpp:35
ripple::STObject
Definition: STObject.h:51
ripple::ApplyView::insert
virtual void insert(std::shared_ptr< SLE > const &sle)=0
Insert a new state SLE.
ripple
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition: RCLCensorshipDetector.h:29
ripple::Transactor::view
ApplyView & view()
Definition: Transactor.h:107
ripple::temDISABLED
@ temDISABLED
Definition: TER.h:109
ripple::ReadView::seq
LedgerIndex seq() const
Returns the sequence number of the base ledger.
Definition: ReadView.h:203
ripple::STTx::getSignature
Blob getSignature() const
Definition: STTx.cpp:170
ripple::tefALREADY
@ tefALREADY
Definition: TER.h:146
ripple::featureNegativeUNL
const uint256 featureNegativeUNL
ripple::STObject::isFieldPresent
bool isFieldPresent(SField const &field) const
Definition: STObject.cpp:428
ripple::sfReferenceFeeUnits
const SF_UINT32 sfReferenceFeeUnits
ripple::STVector256
Definition: STVector256.h:29
std::vector::empty
T empty(T... args)
ripple::Transactor::ctx_
ApplyContext & ctx_
Definition: Transactor.h:88
ripple::STArray::back
STObject & back()
Definition: STArray.h:193
ripple::keylet::fees
Keylet const & fees() noexcept
The (fixed) index of the object containing the ledger fees.
Definition: Indexes.cpp:171
ripple::sfFee
const SF_AMOUNT sfFee
ripple::sfAccount
const SF_ACCOUNT sfAccount
ripple::ltRIPPLE_STATE
@ ltRIPPLE_STATE
A ledger object which describes a bidirectional trust line.
Definition: LedgerFormats.h:74
ripple::detail::ApplyViewBase::peek
std::shared_ptr< SLE > peek(Keylet const &k) override
Prepare to modify the SLE associated with key.
Definition: ApplyViewBase.cpp:128
ripple::strHex
std::string strHex(FwdIt begin, FwdIt end)
Definition: strHex.h:30
ripple::Change::activateTrustLinesToSelfFix
void activateTrustLinesToSelfFix()
Definition: Change.cpp:126
ripple::PreflightContext::tx
STTx const & tx
Definition: Transactor.h:35
ripple::STObject::getFieldU32
std::uint32_t getFieldU32(SField const &field) const
Definition: STObject.cpp:559
ripple::PreflightContext
State information when preflighting a tx.
Definition: Transactor.h:31
ripple::keylet::negativeUNL
Keylet const & negativeUNL() noexcept
The (fixed) index of the object containing the ledger negativeUNL.
Definition: Indexes.cpp:179
ripple::PreflightContext::rules
const Rules rules
Definition: Transactor.h:36
ripple::sfAmendment
const SF_UINT256 sfAmendment
ripple::Change::applyFee
TER applyFee()
Definition: Change.cpp:307
ripple::sfMajorities
const SField sfMajorities
ripple::ReadView::open
virtual bool open() const =0
Returns true if this reflects an open ledger.
ripple::lsfHighReserve
@ lsfHighReserve
Definition: LedgerFormats.h:242
ripple::sfDisabledValidators
const SField sfDisabledValidators
ripple::tesSUCCESS
@ tesSUCCESS
Definition: TER.h:219
string_view
ripple::sfPublicKey
const SF_VL sfPublicKey
ripple::Transactor::account_
const AccountID account_
Definition: Transactor.h:91
ripple::sfHighNode
const SF_UINT64 sfHighNode
ripple::STObject::getFieldAmount
STAmount const & getFieldAmount(SField const &field) const
Definition: STObject.cpp:603
ripple::ApplyContext::tx
STTx const & tx
Definition: ApplyContext.h:48
ripple::temINVALID
@ temINVALID
Definition: TER.h:105
ripple::sfAmendments
const SF_VECTOR256 sfAmendments
ripple::sfValidatorToReEnable
const SF_VL sfValidatorToReEnable
ripple::NotTEC
TERSubset< CanCvtToNotTEC > NotTEC
Definition: TER.h:525
ripple::STObject::getFieldH256
uint256 getFieldH256(SField const &field) const
Definition: STObject.cpp:583