build(deps-dev): apply updates
[e-mobility-charging-stations-simulator.git] / src / charging-station / AutomaticTransactionGenerator.ts
CommitLineData
edd13439 1// Partial Copyright Jerome Benoit. 2021-2023. All Rights Reserved.
c8eeb62b 2
01f4001e 3import { AsyncResource } from 'node:async_hooks';
d4b944ae 4
be4c6702
JB
5import { hoursToMilliseconds, secondsToMilliseconds } from 'date-fns';
6
4c3c0d59 7import type { ChargingStation } from './ChargingStation';
08b58f00 8import { checkChargingStation } from './Helpers';
4c3c0d59 9import { IdTagsCache } from './IdTagsCache';
ae725be3 10import { OCPPServiceUtils } from './ocpp';
268a74bb 11import { BaseError } from '../exception';
b84bca85 12import { PerformanceStatistics } from '../performance';
e7aeea18
JB
13import {
14 AuthorizationStatus,
9b4d0c70 15 ConnectorStatusEnum,
268a74bb 16 RequestCommand,
976d11ec
JB
17 type StartTransactionRequest,
18 type StartTransactionResponse,
268a74bb 19 type Status,
e7aeea18 20 StopTransactionReason,
976d11ec 21 type StopTransactionResponse,
268a74bb 22} from '../types';
9bf0ef23
JB
23import {
24 Constants,
25 cloneObject,
26 formatDurationMilliSeconds,
27 getRandomInteger,
28 isNullOrUndefined,
29 logPrefix,
30 logger,
31 secureRandom,
32 sleep,
33} from '../utils';
6af9012e 34
d4b944ae
JB
35const moduleName = 'AutomaticTransactionGenerator';
36
268a74bb 37export class AutomaticTransactionGenerator extends AsyncResource {
e7aeea18
JB
38 private static readonly instances: Map<string, AutomaticTransactionGenerator> = new Map<
39 string,
40 AutomaticTransactionGenerator
41 >();
10068088 42
5e3cb728 43 public readonly connectorsStatus: Map<number, Status>;
265e4266 44 public started: boolean;
11353865
JB
45 private starting: boolean;
46 private stopping: boolean;
9e23580d 47 private readonly chargingStation: ChargingStation;
6af9012e 48
ac7f79af 49 private constructor(chargingStation: ChargingStation) {
d4b944ae 50 super(moduleName);
aa428a31 51 this.started = false;
11353865
JB
52 this.starting = false;
53 this.stopping = false;
ad2f27c3 54 this.chargingStation = chargingStation;
7807ccf2
JB
55 this.connectorsStatus = new Map<number, Status>();
56 this.initializeConnectorsStatus();
6af9012e
JB
57 }
58
fa7bccf4 59 public static getInstance(
5edd8ba0 60 chargingStation: ChargingStation,
1895299d 61 ): AutomaticTransactionGenerator | undefined {
4dff3039 62 if (AutomaticTransactionGenerator.instances.has(chargingStation.stationInfo.hashId) === false) {
e7aeea18 63 AutomaticTransactionGenerator.instances.set(
51c83d6f 64 chargingStation.stationInfo.hashId,
5edd8ba0 65 new AutomaticTransactionGenerator(chargingStation),
e7aeea18 66 );
73b9adec 67 }
51c83d6f 68 return AutomaticTransactionGenerator.instances.get(chargingStation.stationInfo.hashId);
73b9adec
JB
69 }
70
7d75bee1 71 public start(): void {
fba11dc6 72 if (checkChargingStation(this.chargingStation, this.logPrefix()) === false) {
d1c6c833
JB
73 return;
74 }
a5e9befc 75 if (this.started === true) {
ba7965c4 76 logger.warn(`${this.logPrefix()} is already started`);
b809adf1
JB
77 return;
78 }
11353865
JB
79 if (this.starting === true) {
80 logger.warn(`${this.logPrefix()} is already starting`);
81 return;
82 }
83 this.starting = true;
72740232 84 this.startConnectors();
265e4266 85 this.started = true;
11353865 86 this.starting = false;
6af9012e
JB
87 }
88
9ff486f4 89 public stop(): void {
a5e9befc 90 if (this.started === false) {
ba7965c4 91 logger.warn(`${this.logPrefix()} is already stopped`);
265e4266
JB
92 return;
93 }
11353865
JB
94 if (this.stopping === true) {
95 logger.warn(`${this.logPrefix()} is already stopping`);
96 return;
97 }
98 this.stopping = true;
9ff486f4 99 this.stopConnectors();
265e4266 100 this.started = false;
11353865 101 this.stopping = false;
6af9012e
JB
102 }
103
a5e9befc 104 public startConnector(connectorId: number): void {
fba11dc6 105 if (checkChargingStation(this.chargingStation, this.logPrefix(connectorId)) === false) {
d1c6c833
JB
106 return;
107 }
7807ccf2 108 if (this.connectorsStatus.has(connectorId) === false) {
a03a128d 109 logger.error(`${this.logPrefix(connectorId)} starting on non existing connector`);
7807ccf2 110 throw new BaseError(`Connector ${connectorId} does not exist`);
a5e9befc
JB
111 }
112 if (this.connectorsStatus.get(connectorId)?.start === false) {
d4b944ae 113 this.runInAsyncScope(
e6159ce8
JB
114 this.internalStartConnector.bind(this) as (
115 this: AutomaticTransactionGenerator,
e843aa40 116 ...args: unknown[]
64818750 117 ) => Promise<void>,
d4b944ae 118 this,
5edd8ba0 119 connectorId,
59b6ed8d 120 ).catch(Constants.EMPTY_FUNCTION);
ecb3869d 121 } else if (this.connectorsStatus.get(connectorId)?.start === true) {
ba7965c4 122 logger.warn(`${this.logPrefix(connectorId)} is already started on connector`);
a5e9befc
JB
123 }
124 }
125
9ff486f4 126 public stopConnector(connectorId: number): void {
7807ccf2 127 if (this.connectorsStatus.has(connectorId) === false) {
a03a128d 128 logger.error(`${this.logPrefix(connectorId)} stopping on non existing connector`);
7807ccf2 129 throw new BaseError(`Connector ${connectorId} does not exist`);
ba7965c4
JB
130 }
131 if (this.connectorsStatus.get(connectorId)?.start === true) {
e1d9a0f4 132 this.connectorsStatus.get(connectorId)!.start = false;
ba7965c4
JB
133 } else if (this.connectorsStatus.get(connectorId)?.start === false) {
134 logger.warn(`${this.logPrefix(connectorId)} is already stopped on connector`);
135 }
a5e9befc
JB
136 }
137
72740232 138 private startConnectors(): void {
e7aeea18
JB
139 if (
140 this.connectorsStatus?.size > 0 &&
141 this.connectorsStatus.size !== this.chargingStation.getNumberOfConnectors()
142 ) {
54544ef1 143 this.connectorsStatus.clear();
7807ccf2 144 this.initializeConnectorsStatus();
54544ef1 145 }
4334db72
JB
146 if (this.chargingStation.hasEvses) {
147 for (const [evseId, evseStatus] of this.chargingStation.evses) {
148 if (evseId > 0) {
149 for (const connectorId of evseStatus.connectors.keys()) {
150 this.startConnector(connectorId);
151 }
152 }
153 }
154 } else {
155 for (const connectorId of this.chargingStation.connectors.keys()) {
156 if (connectorId > 0) {
157 this.startConnector(connectorId);
158 }
72740232
JB
159 }
160 }
161 }
162
9ff486f4 163 private stopConnectors(): void {
4334db72
JB
164 if (this.chargingStation.hasEvses) {
165 for (const [evseId, evseStatus] of this.chargingStation.evses) {
166 if (evseId > 0) {
167 for (const connectorId of evseStatus.connectors.keys()) {
9ff486f4 168 this.stopConnector(connectorId);
4334db72
JB
169 }
170 }
171 }
172 } else {
173 for (const connectorId of this.chargingStation.connectors.keys()) {
174 if (connectorId > 0) {
9ff486f4 175 this.stopConnector(connectorId);
4334db72 176 }
72740232
JB
177 }
178 }
179 }
180
83a3286a 181 private async internalStartConnector(connectorId: number): Promise<void> {
083fb002 182 this.setStartConnectorStatus(connectorId);
e7aeea18 183 logger.info(
44eb6026 184 `${this.logPrefix(
5edd8ba0 185 connectorId,
9bf0ef23 186 )} started on connector and will run for ${formatDurationMilliSeconds(
e1d9a0f4
JB
187 this.connectorsStatus.get(connectorId)!.stopDate!.getTime() -
188 this.connectorsStatus.get(connectorId)!.startDate!.getTime(),
5edd8ba0 189 )}`,
e7aeea18 190 );
1895299d 191 while (this.connectorsStatus.get(connectorId)?.start === true) {
0bd926c1 192 if (!this.canStartConnector(connectorId)) {
9ff486f4 193 this.stopConnector(connectorId);
9b4d0c70
JB
194 break;
195 }
c0560973 196 if (!this.chargingStation?.ocppRequestService) {
e7aeea18
JB
197 logger.info(
198 `${this.logPrefix(
5edd8ba0
JB
199 connectorId,
200 )} transaction loop waiting for charging station service to be initialized`,
e7aeea18 201 );
c0560973 202 do {
9bf0ef23 203 await sleep(Constants.CHARGING_STATION_ATG_INITIALIZATION_TIME);
c0560973
JB
204 } while (!this.chargingStation?.ocppRequestService);
205 }
be4c6702 206 const wait = secondsToMilliseconds(
9bf0ef23 207 getRandomInteger(
ac7f79af 208 this.chargingStation.getAutomaticTransactionGeneratorConfiguration()
86b46b49 209 .maxDelayBetweenTwoTransactions,
ac7f79af 210 this.chargingStation.getAutomaticTransactionGeneratorConfiguration()
5edd8ba0 211 .minDelayBetweenTwoTransactions,
be4c6702
JB
212 ),
213 );
9bf0ef23
JB
214 logger.info(`${this.logPrefix(connectorId)} waiting for ${formatDurationMilliSeconds(wait)}`);
215 await sleep(wait);
216 const start = secureRandom();
ac7f79af
JB
217 if (
218 start <
219 this.chargingStation.getAutomaticTransactionGeneratorConfiguration().probabilityOfStart
220 ) {
e1d9a0f4 221 this.connectorsStatus.get(connectorId)!.skippedConsecutiveTransactions = 0;
6af9012e 222 // Start transaction
aef1b33a 223 const startResponse = await this.startTransaction(connectorId);
0afed85f 224 if (startResponse?.idTagInfo?.status === AuthorizationStatus.ACCEPTED) {
6af9012e 225 // Wait until end of transaction
be4c6702 226 const waitTrxEnd = secondsToMilliseconds(
9bf0ef23 227 getRandomInteger(
86b46b49 228 this.chargingStation.getAutomaticTransactionGeneratorConfiguration().maxDuration,
5edd8ba0 229 this.chargingStation.getAutomaticTransactionGeneratorConfiguration().minDuration,
be4c6702
JB
230 ),
231 );
e7aeea18 232 logger.info(
1c9de2b9
JB
233 `${this.logPrefix(
234 connectorId,
235 )} transaction started with id ${this.chargingStation.getConnectorStatus(connectorId)
236 ?.transactionId} and will stop in ${formatDurationMilliSeconds(waitTrxEnd)}`,
e7aeea18 237 );
9bf0ef23 238 await sleep(waitTrxEnd);
85d20667 239 await this.stopTransaction(connectorId);
6af9012e
JB
240 }
241 } else {
e1d9a0f4
JB
242 ++this.connectorsStatus.get(connectorId)!.skippedConsecutiveTransactions!;
243 ++this.connectorsStatus.get(connectorId)!.skippedTransactions!;
e7aeea18 244 logger.info(
1c9de2b9
JB
245 `${this.logPrefix(connectorId)} skipped consecutively ${this.connectorsStatus.get(
246 connectorId,
247 )?.skippedConsecutiveTransactions}/${this.connectorsStatus.get(connectorId)
248 ?.skippedTransactions} transaction(s)`,
e7aeea18 249 );
6af9012e 250 }
e1d9a0f4 251 this.connectorsStatus.get(connectorId)!.lastRunDate = new Date();
7d75bee1 252 }
e1d9a0f4 253 this.connectorsStatus.get(connectorId)!.stoppedDate = new Date();
e7aeea18 254 logger.info(
44eb6026 255 `${this.logPrefix(
5edd8ba0 256 connectorId,
9bf0ef23 257 )} stopped on connector and lasted for ${formatDurationMilliSeconds(
e1d9a0f4
JB
258 this.connectorsStatus.get(connectorId)!.stoppedDate!.getTime() -
259 this.connectorsStatus.get(connectorId)!.startDate!.getTime(),
5edd8ba0 260 )}`,
e7aeea18
JB
261 );
262 logger.debug(
be9ee554 263 `${this.logPrefix(connectorId)} connector status: %j`,
5edd8ba0 264 this.connectorsStatus.get(connectorId),
e7aeea18 265 );
6af9012e
JB
266 }
267
083fb002 268 private setStartConnectorStatus(connectorId: number): void {
e1d9a0f4 269 this.connectorsStatus.get(connectorId)!.skippedConsecutiveTransactions = 0;
e7aeea18 270 const previousRunDuration =
72092cfc
JB
271 this.connectorsStatus.get(connectorId)?.startDate &&
272 this.connectorsStatus.get(connectorId)?.lastRunDate
e1d9a0f4
JB
273 ? this.connectorsStatus.get(connectorId)!.lastRunDate!.getTime() -
274 this.connectorsStatus.get(connectorId)!.startDate!.getTime()
e7aeea18 275 : 0;
e1d9a0f4
JB
276 this.connectorsStatus.get(connectorId)!.startDate = new Date();
277 this.connectorsStatus.get(connectorId)!.stopDate = new Date(
278 this.connectorsStatus.get(connectorId)!.startDate!.getTime() +
be4c6702
JB
279 hoursToMilliseconds(
280 this.chargingStation.getAutomaticTransactionGeneratorConfiguration().stopAfterHours,
281 ) -
5edd8ba0 282 previousRunDuration,
e7aeea18 283 );
e1d9a0f4 284 this.connectorsStatus.get(connectorId)!.start = true;
4dff3039
JB
285 }
286
0bd926c1
JB
287 private canStartConnector(connectorId: number): boolean {
288 if (new Date() > this.connectorsStatus.get(connectorId)!.stopDate!) {
289 return false;
290 }
291 if (this.chargingStation.inAcceptedState() === false) {
292 logger.error(
293 `${this.logPrefix(
294 connectorId,
295 )} entered in transaction loop while the charging station is not in accepted state`,
296 );
297 return false;
298 }
299 if (this.chargingStation.isChargingStationAvailable() === false) {
300 logger.info(
301 `${this.logPrefix(
302 connectorId,
303 )} entered in transaction loop while the charging station is unavailable`,
304 );
305 return false;
306 }
307 if (this.chargingStation.isConnectorAvailable(connectorId) === false) {
308 logger.info(
309 `${this.logPrefix(
310 connectorId,
311 )} entered in transaction loop while the connector ${connectorId} is unavailable`,
312 );
313 return false;
314 }
315 if (
316 this.chargingStation.getConnectorStatus(connectorId)?.status ===
317 ConnectorStatusEnum.Unavailable
318 ) {
319 logger.info(
320 `${this.logPrefix(
321 connectorId,
322 )} entered in transaction loop while the connector ${connectorId} status is unavailable`,
323 );
324 return false;
325 }
326 return true;
327 }
328
7807ccf2 329 private initializeConnectorsStatus(): void {
4334db72
JB
330 if (this.chargingStation.hasEvses) {
331 for (const [evseId, evseStatus] of this.chargingStation.evses) {
332 if (evseId > 0) {
333 for (const connectorId of evseStatus.connectors.keys()) {
5ced7e80 334 this.connectorsStatus.set(connectorId, this.getConnectorStatus(connectorId));
4334db72
JB
335 }
336 }
337 }
338 } else {
339 for (const connectorId of this.chargingStation.connectors.keys()) {
340 if (connectorId > 0) {
5ced7e80 341 this.connectorsStatus.set(connectorId, this.getConnectorStatus(connectorId));
4334db72 342 }
4dff3039
JB
343 }
344 }
72740232
JB
345 }
346
5ced7e80 347 private getConnectorStatus(connectorId: number): Status {
0a0da58d
JB
348 const connectorStatus = this.chargingStation.getAutomaticTransactionGeneratorStatuses()?.[
349 connectorId
350 ]
a82d0329
JB
351 ? cloneObject<Status>(
352 this.chargingStation.getAutomaticTransactionGeneratorStatuses()![connectorId],
353 )
bdc9dc79 354 : undefined;
3d20f4db 355 this.resetConnectorStatus(connectorStatus);
5ced7e80
JB
356 return (
357 connectorStatus ?? {
358 start: false,
359 authorizeRequests: 0,
360 acceptedAuthorizeRequests: 0,
361 rejectedAuthorizeRequests: 0,
362 startTransactionRequests: 0,
363 acceptedStartTransactionRequests: 0,
364 rejectedStartTransactionRequests: 0,
365 stopTransactionRequests: 0,
366 acceptedStopTransactionRequests: 0,
367 rejectedStopTransactionRequests: 0,
368 skippedConsecutiveTransactions: 0,
369 skippedTransactions: 0,
370 }
371 );
372 }
373
3d20f4db
JB
374 private resetConnectorStatus(connectorStatus: Status | undefined): void {
375 delete connectorStatus?.startDate;
376 delete connectorStatus?.lastRunDate;
377 delete connectorStatus?.stopDate;
378 delete connectorStatus?.stoppedDate;
379 if (
380 !this.started &&
381 (connectorStatus?.start === true ||
382 this.chargingStation.getAutomaticTransactionGeneratorConfiguration().enable === false)
383 ) {
384 connectorStatus!.start = false;
385 }
386 }
387
e7aeea18 388 private async startTransaction(
5edd8ba0 389 connectorId: number,
0afed85f 390 ): Promise<StartTransactionResponse | undefined> {
aef1b33a
JB
391 const measureId = 'StartTransaction with ATG';
392 const beginId = PerformanceStatistics.beginMeasure(measureId);
e1d9a0f4 393 let startResponse: StartTransactionResponse | undefined;
f911a4af
JB
394 if (this.chargingStation.hasIdTags()) {
395 const idTag = IdTagsCache.getInstance().getIdTag(
e1d9a0f4 396 this.chargingStation.getAutomaticTransactionGeneratorConfiguration().idTagDistribution!,
aaf2bf9c 397 this.chargingStation,
5edd8ba0 398 connectorId,
aaf2bf9c 399 );
5cf9050d 400 const startTransactionLogMsg = `${this.logPrefix(
5edd8ba0 401 connectorId,
ba7965c4 402 )} start transaction with an idTag '${idTag}'`;
ccb1d6e9 403 if (this.getRequireAuthorize()) {
e1d9a0f4 404 ++this.connectorsStatus.get(connectorId)!.authorizeRequests!;
ae725be3 405 if (await OCPPServiceUtils.isIdTagAuthorized(this.chargingStation, connectorId, idTag)) {
e1d9a0f4 406 ++this.connectorsStatus.get(connectorId)!.acceptedAuthorizeRequests!;
5cf9050d 407 logger.info(startTransactionLogMsg);
5fdab605 408 // Start transaction
f7f98c68 409 startResponse = await this.chargingStation.ocppRequestService.requestHandler<
ef6fa3fb
JB
410 StartTransactionRequest,
411 StartTransactionResponse
08f130a0 412 >(this.chargingStation, RequestCommand.START_TRANSACTION, {
ef6fa3fb
JB
413 connectorId,
414 idTag,
415 });
d9ac47ef 416 this.handleStartTransactionResponse(connectorId, startResponse);
aef1b33a
JB
417 PerformanceStatistics.endMeasure(measureId, beginId);
418 return startResponse;
5fdab605 419 }
e1d9a0f4 420 ++this.connectorsStatus.get(connectorId)!.rejectedAuthorizeRequests!;
aef1b33a 421 PerformanceStatistics.endMeasure(measureId, beginId);
0afed85f 422 return startResponse;
ef6076c1 423 }
5cf9050d 424 logger.info(startTransactionLogMsg);
5fdab605 425 // Start transaction
f7f98c68 426 startResponse = await this.chargingStation.ocppRequestService.requestHandler<
ef6fa3fb
JB
427 StartTransactionRequest,
428 StartTransactionResponse
08f130a0 429 >(this.chargingStation, RequestCommand.START_TRANSACTION, {
ef6fa3fb
JB
430 connectorId,
431 idTag,
432 });
d9ac47ef 433 this.handleStartTransactionResponse(connectorId, startResponse);
aef1b33a
JB
434 PerformanceStatistics.endMeasure(measureId, beginId);
435 return startResponse;
6af9012e 436 }
5cf9050d 437 logger.info(`${this.logPrefix(connectorId)} start transaction without an idTag`);
f7f98c68 438 startResponse = await this.chargingStation.ocppRequestService.requestHandler<
ef6fa3fb
JB
439 StartTransactionRequest,
440 StartTransactionResponse
08f130a0 441 >(this.chargingStation, RequestCommand.START_TRANSACTION, { connectorId });
431b6bd5 442 this.handleStartTransactionResponse(connectorId, startResponse);
aef1b33a
JB
443 PerformanceStatistics.endMeasure(measureId, beginId);
444 return startResponse;
6af9012e
JB
445 }
446
e7aeea18
JB
447 private async stopTransaction(
448 connectorId: number,
9ff486f4 449 reason = StopTransactionReason.LOCAL,
e1d9a0f4 450 ): Promise<StopTransactionResponse | undefined> {
aef1b33a
JB
451 const measureId = 'StopTransaction with ATG';
452 const beginId = PerformanceStatistics.beginMeasure(measureId);
e1d9a0f4 453 let stopResponse: StopTransactionResponse | undefined;
6d9876e7 454 if (this.chargingStation.getConnectorStatus(connectorId)?.transactionStarted === true) {
49563992
JB
455 logger.info(
456 `${this.logPrefix(
457 connectorId,
458 )} stop transaction with id ${this.chargingStation.getConnectorStatus(connectorId)
459 ?.transactionId}`,
460 );
5e3cb728 461 stopResponse = await this.chargingStation.stopTransactionOnConnector(connectorId, reason);
e1d9a0f4 462 ++this.connectorsStatus.get(connectorId)!.stopTransactionRequests!;
0afed85f 463 if (stopResponse?.idTagInfo?.status === AuthorizationStatus.ACCEPTED) {
e1d9a0f4 464 ++this.connectorsStatus.get(connectorId)!.acceptedStopTransactionRequests!;
6d9876e7 465 } else {
e1d9a0f4 466 ++this.connectorsStatus.get(connectorId)!.rejectedStopTransactionRequests!;
6d9876e7 467 }
0045cef5 468 } else {
1895299d 469 const transactionId = this.chargingStation.getConnectorStatus(connectorId)?.transactionId;
ff581359 470 logger.debug(
ba7965c4 471 `${this.logPrefix(connectorId)} stopping a not started transaction${
1c9de2b9 472 !isNullOrUndefined(transactionId) ? ` with id ${transactionId}` : ''
5edd8ba0 473 }`,
e7aeea18 474 );
0045cef5 475 }
aef1b33a
JB
476 PerformanceStatistics.endMeasure(measureId, beginId);
477 return stopResponse;
c0560973
JB
478 }
479
ccb1d6e9 480 private getRequireAuthorize(): boolean {
ac7f79af
JB
481 return (
482 this.chargingStation.getAutomaticTransactionGeneratorConfiguration()?.requireAuthorize ?? true
483 );
ccb1d6e9
JB
484 }
485
8b7072dc 486 private logPrefix = (connectorId?: number): string => {
9bf0ef23 487 return logPrefix(
6cd85def 488 ` ${this.chargingStation.stationInfo.chargingStationId} | ATG${
1c9de2b9 489 !isNullOrUndefined(connectorId) ? ` on connector #${connectorId}` : ''
5edd8ba0 490 }:`,
6cd85def 491 );
8b7072dc 492 };
d9ac47ef
JB
493
494 private handleStartTransactionResponse(
495 connectorId: number,
5edd8ba0 496 startResponse: StartTransactionResponse,
d9ac47ef 497 ): void {
e1d9a0f4 498 ++this.connectorsStatus.get(connectorId)!.startTransactionRequests!;
d9ac47ef 499 if (startResponse?.idTagInfo?.status === AuthorizationStatus.ACCEPTED) {
e1d9a0f4 500 ++this.connectorsStatus.get(connectorId)!.acceptedStartTransactionRequests!;
d9ac47ef 501 } else {
44eb6026 502 logger.warn(`${this.logPrefix(connectorId)} start transaction rejected`);
e1d9a0f4 503 ++this.connectorsStatus.get(connectorId)!.rejectedStartTransactionRequests!;
d9ac47ef
JB
504 }
505 }
6af9012e 506}