File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
src/ripple_app/transactors Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -212,9 +212,14 @@ TER PaymentTransactor::doApply ()
212212 try
213213 {
214214 bool const openLedger = is_bit_set (mParams , tapOPEN_LEDGER);
215- bool const tooManyPaths = spsPaths.size () > MaxPathSize;
216215
217- terResult = openLedger && tooManyPaths
216+ bool pathTooBig = spsPaths.size () > MaxPathSize;
217+
218+ for (auto const & path : spsPaths)
219+ if (path.size () > MaxPathLength)
220+ pathTooBig = true ;
221+
222+ terResult = openLedger && pathTooBig
218223 ? telBAD_PATH_COUNT // Too many paths for proposed ledger.
219224 : RippleCalc::rippleCalc (
220225 mEngine ->view (),
Original file line number Diff line number Diff line change @@ -37,6 +37,9 @@ class PaymentTransactor
3737 /* The largest number of paths we allow */
3838 static std::size_t const MaxPathSize = 6 ;
3939
40+ /* The longest path we allow */
41+ static std::size_t const MaxPathLength = 8 ;
42+
4043public:
4144 PaymentTransactor (
4245 SerializedTransaction const & txn,
You can’t perform that action at this time.
0 commit comments