Skip to content

Commit 32ed561

Browse files
committed
Remove PSIBASE_RELFECT_EVENTS. It doesn't do anything useful.
1 parent fd48225 commit 32ed561

12 files changed

Lines changed: 1 addition & 17 deletions

File tree

doc/src/development/services/cpp-service/reference/services-events.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ auto result =
6666

6767
## Defining events
6868

69-
To define events for a service, declare the event functions as below, then reflect them using the 3 macros below. Each of the `History` and `Merkle` structs must be present and reflected, even when they don't have any events declared within.
69+
To define events for a service, declare the event functions as below, then reflect them using the 2 macros below. Each of the `History` and `Merkle` structs must be present and reflected, even when they don't have any events declared within.
7070

7171
After you have defined your events, use [psibase::Service::emit] to emit them and [psibase::Service::events] to read them.
7272

@@ -91,8 +91,6 @@ struct MyService: psibase::Service<MyService> {
9191
};
9292
};
9393

94-
PSIBASE_REFLECT_EVENTS(MyService)
95-
9694
PSIBASE_REFLECT_HISTORY_EVENTS(
9795
MyService,
9896
method(myEvent, a, s),

libraries/psibase/common/include/psibase/Service.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,6 @@ namespace psibase
179179
}; // Service
180180
}; // namespace psibase
181181

182-
#define PSIBASE_REFLECT_EVENTS(SERVICE) \
183-
using SERVICE##_Events = SERVICE ::Events; \
184-
PSIO_REFLECT(SERVICE##_Events)
185-
186182
#define PSIBASE_REFLECT_HISTORY_EVENTS(SERVICE, ...) \
187183
using SERVICE##_EventsHistory = SERVICE ::Events::History; \
188184
PSIO_REFLECT(SERVICE##_EventsHistory, __VA_ARGS__)

packages/psibase_tests/include/services/test/EmitEvents.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ namespace TestService
5252
method(emitExample, r),
5353
method(serveSys, request))
5454

55-
PSIBASE_REFLECT_EVENTS(EmitEvents)
5655
PSIBASE_REFLECT_HISTORY_EVENTS(EmitEvents, //
5756
method(e, s, i),
5857
method(e2, r))

packages/system/StagedTx/service/cpp/include/services/system/StagedTx.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ namespace SystemService
118118
method(execute, id, txid),
119119
method(get_staged_tx, id),
120120
);
121-
PSIBASE_REFLECT_EVENTS(StagedTxService);
122121
PSIBASE_REFLECT_HISTORY_EVENTS(StagedTxService,
123122
method(updated, txid, actor, datetime, event_type),
124123
);

packages/system/Transact/include/services/system/Transact.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,6 @@ namespace SystemService
531531
)
532532

533533
PSIBASE_REFLECT_TABLES(Transact, Transact::Tables)
534-
PSIBASE_REFLECT_EVENTS(Transact);
535534
PSIBASE_REFLECT_HISTORY_EVENTS(Transact, method(blockStart, blockNum, blockTime));
536535
PSIBASE_PUBLIC_EVENT(Transact::Events::History::blockStart)
537536
PSIBASE_REFLECT_MERKLE_EVENTS(Transact);

packages/system/VirtualServer/service/cpp/include/services/system/VirtualServer.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,6 @@ namespace SystemService
450450
method(setBillableAcc, account),
451451
method(serveSys, request, socket, user))
452452

453-
PSIBASE_REFLECT_EVENTS(VirtualServer);
454453
PSIBASE_REFLECT_HISTORY_EVENTS(
455454
VirtualServer,
456455
allowHashedMethods(),

packages/user/Chainmail/include/services/user/Chainmail.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ namespace UserService
5858
method(unsave, msg_id, sender, subject, body, datetime),
5959
method(serveSys, request)
6060
);
61-
PSIBASE_REFLECT_EVENTS(Chainmail);
6261
PSIBASE_REFLECT_HISTORY_EVENTS(Chainmail,
6362
method(sent, sender, receiver, subject, body, datetime),
6463
method(archive, msg_id),

packages/user/Events/test/TestService.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ PSIO_REFLECT(TestService,
3636
method(sendAccount, a),
3737
method(sendTime, t))
3838

39-
PSIBASE_REFLECT_EVENTS(TestService);
4039
PSIBASE_REFLECT_HISTORY_EVENTS(TestService,
4140
method(testEvent, i, d, v, s),
4241
method(opt, opt),

packages/user/Invite/include/services/user/Invite.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ namespace UserService
118118
method(getInvite, inviteId),
119119
method(getExpDate, inviteId),
120120
);
121-
PSIBASE_REFLECT_EVENTS(Invite);
122121
PSIBASE_REFLECT_HISTORY_EVENTS(Invite,
123122
method(updated, inviteId, actor, event),
124123
);

packages/user/Nft/include/services/user/Nft.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ namespace UserService
7474
method(exists, nftId),
7575
method(getUserConf, account, flag)
7676
);
77-
PSIBASE_REFLECT_EVENTS(Nft);
7877
PSIBASE_REFLECT_HISTORY_EVENTS(Nft,
7978
method(minted, nftId, issuer),
8079
method(burned, nftId, owner),

0 commit comments

Comments
 (0)