1717*/
1818// ==============================================================================
1919
20- #include < ripple/app/tx/impl/SetCron .h>
20+ #include < ripple/app/tx/impl/CronSet .h>
2121#include < ripple/basics/Log.h>
2222#include < ripple/ledger/View.h>
2323#include < ripple/protocol/Feature.h>
2828namespace ripple {
2929
3030TxConsequences
31- SetCron ::makeTxConsequences (PreflightContext const & ctx)
31+ CronSet ::makeTxConsequences (PreflightContext const & ctx)
3232{
3333 return TxConsequences{ctx.tx , TxConsequences::normal};
3434}
3535
3636NotTEC
37- SetCron ::preflight (PreflightContext const & ctx)
37+ CronSet ::preflight (PreflightContext const & ctx)
3838{
3939 if (!ctx.rules .enabled (featureCron))
4040 return temDISABLED;
@@ -47,7 +47,7 @@ SetCron::preflight(PreflightContext const& ctx)
4747
4848 if (tx.getFlags () & tfCronSetMask)
4949 {
50- JLOG (j.warn ()) << " SetCron : Invalid flags set." ;
50+ JLOG (j.warn ()) << " CronSet : Invalid flags set." ;
5151 return temINVALID_FLAG;
5252 }
5353
@@ -69,7 +69,7 @@ SetCron::preflight(PreflightContext const& ctx)
6969 // delete operation
7070 if (hasDelay || hasRepeat || hasStartTime)
7171 {
72- JLOG (j.debug ()) << " SetCron : tfCronUnset flag cannot be used with "
72+ JLOG (j.debug ()) << " CronSet : tfCronUnset flag cannot be used with "
7373 " DelaySeconds, RepeatCount or StartTime." ;
7474 return temMALFORMED;
7575 }
@@ -81,15 +81,15 @@ SetCron::preflight(PreflightContext const& ctx)
8181 if (!hasStartTime)
8282 {
8383 JLOG (j.debug ())
84- << " SetCron : StartTime is required. Use StartTime=0 for "
84+ << " CronSet : StartTime is required. Use StartTime=0 for "
8585 " immediate execution, or specify a future timestamp." ;
8686 return temMALFORMED;
8787 }
8888
8989 if ((!hasDelay && hasRepeat) || (hasDelay && !hasRepeat))
9090 {
9191 JLOG (j.debug ())
92- << " SetCron : DelaySeconds and RepeatCount must both be present "
92+ << " CronSet : DelaySeconds and RepeatCount must both be present "
9393 " for recurring crons, or both absent for one-off crons." ;
9494 return temMALFORMED;
9595 }
@@ -101,7 +101,7 @@ SetCron::preflight(PreflightContext const& ctx)
101101 if (delay > 31536000UL /* 365 days in seconds */ )
102102 {
103103 JLOG (j.debug ())
104- << " SetCron : DelaySeconds was too high. (max 365 "
104+ << " CronSet : DelaySeconds was too high. (max 365 "
105105 " days in seconds)." ;
106106 return temMALFORMED;
107107 }
@@ -114,16 +114,16 @@ SetCron::preflight(PreflightContext const& ctx)
114114 if (recur == 0 )
115115 {
116116 JLOG (j.debug ())
117- << " SetCron : RepeatCount must be greater than 0."
117+ << " CronSet : RepeatCount must be greater than 0."
118118 " For one-time execution, omit DelaySeconds and "
119119 " RepeatCount." ;
120120 return temMALFORMED;
121121 }
122122 if (recur > 256 )
123123 {
124124 JLOG (j.debug ())
125- << " SetCron : RepeatCount too high. Limit is 256. Issue "
126- " new SetCron to increase." ;
125+ << " CronSet : RepeatCount too high. Limit is 256. Issue "
126+ " new CronSet to increase." ;
127127 return temMALFORMED;
128128 }
129129 }
@@ -133,7 +133,7 @@ SetCron::preflight(PreflightContext const& ctx)
133133}
134134
135135TER
136- SetCron ::preclaim (PreclaimContext const & ctx)
136+ CronSet ::preclaim (PreclaimContext const & ctx)
137137{
138138 if (ctx.tx .isFieldPresent (sfStartTime) &&
139139 ctx.tx .getFieldU32 (sfStartTime) != 0 )
@@ -146,15 +146,15 @@ SetCron::preclaim(PreclaimContext const& ctx)
146146
147147 if (startTime < parentCloseTime)
148148 {
149- JLOG (ctx.j .debug ()) << " SetCron : StartTime must be in the future "
149+ JLOG (ctx.j .debug ()) << " CronSet : StartTime must be in the future "
150150 " (or 0 for immediate execution)" ;
151151 return tecEXPIRED;
152152 }
153153
154154 if (startTime > ctx.view .parentCloseTime ().time_since_epoch ().count () +
155155 365 * 24 * 60 * 60 )
156156 {
157- JLOG (ctx.j .debug ()) << " SetCron : StartTime is too far in the "
157+ JLOG (ctx.j .debug ()) << " CronSet : StartTime is too far in the "
158158 " future (max 365 days)." ;
159159 return tecEXPIRED;
160160 }
@@ -163,7 +163,7 @@ SetCron::preclaim(PreclaimContext const& ctx)
163163}
164164
165165TER
166- SetCron ::doApply ()
166+ CronSet ::doApply ()
167167{
168168 auto & view = ctx_.view ();
169169 auto const & tx = ctx_.tx ;
@@ -205,21 +205,21 @@ SetCron::doApply()
205205 auto sleCron = view.peek (klOld);
206206 if (!sleCron)
207207 {
208- JLOG (j_.warn ()) << " SetCron : Cron object didn't exist." ;
208+ JLOG (j_.warn ()) << " CronSet : Cron object didn't exist." ;
209209 return tefBAD_LEDGER;
210210 }
211211
212212 if (safe_cast<LedgerEntryType>(
213213 sleCron->getFieldU16 (sfLedgerEntryType)) != ltCRON)
214214 {
215- JLOG (j_.warn ()) << " SetCron : sfCron pointed to non-cron object!!" ;
215+ JLOG (j_.warn ()) << " CronSet : sfCron pointed to non-cron object!!" ;
216216 return tefBAD_LEDGER;
217217 }
218218
219219 if (!view.dirRemove (
220220 keylet::ownerDir (id), (*sleCron)[sfOwnerNode], klOld, false ))
221221 {
222- JLOG (j_.warn ()) << " SetCron : Ownerdir bad. " << id;
222+ JLOG (j_.warn ()) << " CronSet : Ownerdir bad. " << id;
223223 return tefBAD_LEDGER;
224224 }
225225
@@ -278,7 +278,7 @@ SetCron::doApply()
278278}
279279
280280XRPAmount
281- SetCron ::calculateBaseFee (ReadView const & view, STTx const & tx)
281+ CronSet ::calculateBaseFee (ReadView const & view, STTx const & tx)
282282{
283283 auto const baseFee = Transactor::calculateBaseFee (view, tx);
284284
@@ -290,7 +290,7 @@ SetCron::calculateBaseFee(ReadView const& view, STTx const& tx)
290290 tx.isFieldPresent (sfRepeatCount) ? tx.getFieldU32 (sfRepeatCount) : 0 ;
291291
292292 // factor a cost based on the total number of txns expected
293- // for RepeatCount of 0 we have this txn (SetCron ) and the
293+ // for RepeatCount of 0 we have this txn (CronSet ) and the
294294 // single Cron txn (2). For a RepeatCount of 1 we have this txn,
295295 // the first time the cron executes, and the second time (3).
296296 uint32_t const additionalExpectedExecutions = 1 + repeatCount;
0 commit comments