@@ -73,27 +73,27 @@ class SentryClientImpl final : public api::Service {
73
73
}
74
74
75
75
Task<void > reconnect () {
76
- co_await sw_rpc::reconnect_channel (*channel_);
76
+ co_await sw_rpc::reconnect_channel (*channel_, " sentry " );
77
77
}
78
78
79
79
// rpc SetStatus(StatusData) returns (SetStatusReply);
80
80
Task<void > set_status (eth::StatusData status_data) override {
81
81
proto::StatusData request = interfaces::proto_status_data_from_status_data (status_data);
82
- co_await sw_rpc::unary_rpc_with_retries (&Stub::AsyncSetStatus, stub_, std::move (request), grpc_context_, on_disconnect_, *channel_);
82
+ co_await sw_rpc::unary_rpc_with_retries (&Stub::AsyncSetStatus, stub_, std::move (request), grpc_context_, on_disconnect_, *channel_, " sentry " );
83
83
}
84
84
85
85
// rpc HandShake(google.protobuf.Empty) returns (HandShakeReply);
86
86
Task<uint8_t > handshake () override {
87
87
google::protobuf::Empty request;
88
- proto::HandShakeReply reply = co_await sw_rpc::unary_rpc_with_retries (&Stub::AsyncHandShake, stub_, std::move (request), grpc_context_, on_disconnect_, *channel_);
88
+ proto::HandShakeReply reply = co_await sw_rpc::unary_rpc_with_retries (&Stub::AsyncHandShake, stub_, std::move (request), grpc_context_, on_disconnect_, *channel_, " sentry " );
89
89
uint8_t result = interfaces::eth_version_from_protocol (reply.protocol ());
90
90
co_return result;
91
91
}
92
92
93
93
// rpc NodeInfo(google.protobuf.Empty) returns(types.NodeInfoReply);
94
94
Task<NodeInfos> node_infos () override {
95
95
google::protobuf::Empty request;
96
- types::NodeInfoReply reply = co_await sw_rpc::unary_rpc_with_retries (&Stub::AsyncNodeInfo, stub_, std::move (request), grpc_context_, on_disconnect_, *channel_);
96
+ types::NodeInfoReply reply = co_await sw_rpc::unary_rpc_with_retries (&Stub::AsyncNodeInfo, stub_, std::move (request), grpc_context_, on_disconnect_, *channel_, " sentry " );
97
97
auto result = interfaces::node_info_from_proto_node_info (reply);
98
98
co_return NodeInfos{result};
99
99
}
@@ -104,7 +104,7 @@ class SentryClientImpl final : public api::Service {
104
104
request.mutable_data ()->CopyFrom (interfaces::outbound_data_from_message (message));
105
105
request.mutable_peer_id ()->CopyFrom (interfaces::peer_id_from_public_key (public_key));
106
106
107
- proto::SentPeers reply = co_await sw_rpc::unary_rpc_with_retries (&Stub::AsyncSendMessageById, stub_, std::move (request), grpc_context_, on_disconnect_, *channel_);
107
+ proto::SentPeers reply = co_await sw_rpc::unary_rpc_with_retries (&Stub::AsyncSendMessageById, stub_, std::move (request), grpc_context_, on_disconnect_, *channel_, " sentry " );
108
108
auto result = interfaces::peer_keys_from_sent_peers_ids (reply);
109
109
co_return result;
110
110
}
@@ -115,15 +115,15 @@ class SentryClientImpl final : public api::Service {
115
115
request.mutable_data ()->CopyFrom (interfaces::outbound_data_from_message (message));
116
116
request.set_max_peers (max_peers);
117
117
118
- proto::SentPeers reply = co_await sw_rpc::unary_rpc_with_retries (&Stub::AsyncSendMessageToRandomPeers, stub_, std::move (request), grpc_context_, on_disconnect_, *channel_);
118
+ proto::SentPeers reply = co_await sw_rpc::unary_rpc_with_retries (&Stub::AsyncSendMessageToRandomPeers, stub_, std::move (request), grpc_context_, on_disconnect_, *channel_, " sentry " );
119
119
auto result = interfaces::peer_keys_from_sent_peers_ids (reply);
120
120
co_return result;
121
121
}
122
122
123
123
// rpc SendMessageToAll(OutboundMessageData) returns (SentPeers);
124
124
Task<PeerKeys> send_message_to_all (Message message) override {
125
125
proto::OutboundMessageData request = interfaces::outbound_data_from_message (message);
126
- proto::SentPeers reply = co_await sw_rpc::unary_rpc_with_retries (&Stub::AsyncSendMessageToAll, stub_, std::move (request), grpc_context_, on_disconnect_, *channel_);
126
+ proto::SentPeers reply = co_await sw_rpc::unary_rpc_with_retries (&Stub::AsyncSendMessageToAll, stub_, std::move (request), grpc_context_, on_disconnect_, *channel_, " sentry " );
127
127
auto result = interfaces::peer_keys_from_sent_peers_ids (reply);
128
128
co_return result;
129
129
}
@@ -136,7 +136,7 @@ class SentryClientImpl final : public api::Service {
136
136
// request.set_min_block()
137
137
request.set_max_peers (max_peers);
138
138
139
- proto::SentPeers reply = co_await sw_rpc::unary_rpc_with_retries (&Stub::AsyncSendMessageByMinBlock, stub_, std::move (request), grpc_context_, on_disconnect_, *channel_);
139
+ proto::SentPeers reply = co_await sw_rpc::unary_rpc_with_retries (&Stub::AsyncSendMessageByMinBlock, stub_, std::move (request), grpc_context_, on_disconnect_, *channel_, " sentry " );
140
140
auto result = interfaces::peer_keys_from_sent_peers_ids (reply);
141
141
co_return result;
142
142
}
@@ -147,7 +147,7 @@ class SentryClientImpl final : public api::Service {
147
147
request.mutable_peer_id ()->CopyFrom (interfaces::peer_id_from_public_key (public_key));
148
148
// TODO: set_min_block
149
149
// request.set_min_block()
150
- co_await sw_rpc::unary_rpc_with_retries (&Stub::AsyncPeerMinBlock, stub_, std::move (request), grpc_context_, on_disconnect_, *channel_);
150
+ co_await sw_rpc::unary_rpc_with_retries (&Stub::AsyncPeerMinBlock, stub_, std::move (request), grpc_context_, on_disconnect_, *channel_, " sentry " );
151
151
}
152
152
153
153
// rpc Messages(MessagesRequest) returns (stream InboundMessage);
@@ -172,21 +172,22 @@ class SentryClientImpl final : public api::Service {
172
172
grpc_context_,
173
173
on_disconnect_,
174
174
*channel_,
175
+ " sentry" ,
175
176
std::move (proto_consumer));
176
177
}
177
178
178
179
// rpc Peers(google.protobuf.Empty) returns (PeersReply);
179
180
Task<PeerInfos> peers () override {
180
181
google::protobuf::Empty request;
181
- proto::PeersReply reply = co_await sw_rpc::unary_rpc_with_retries (&Stub::AsyncPeers, stub_, std::move (request), grpc_context_, on_disconnect_, *channel_);
182
+ proto::PeersReply reply = co_await sw_rpc::unary_rpc_with_retries (&Stub::AsyncPeers, stub_, std::move (request), grpc_context_, on_disconnect_, *channel_, " sentry " );
182
183
auto result = interfaces::peer_infos_from_proto_peers_reply (reply);
183
184
co_return result;
184
185
}
185
186
186
187
// rpc PeerCount(PeerCountRequest) returns (PeerCountReply);
187
188
Task<size_t > peer_count () override {
188
189
proto::PeerCountRequest request;
189
- proto::PeerCountReply reply = co_await sw_rpc::unary_rpc_with_retries (&Stub::AsyncPeerCount, stub_, std::move (request), grpc_context_, on_disconnect_, *channel_);
190
+ proto::PeerCountReply reply = co_await sw_rpc::unary_rpc_with_retries (&Stub::AsyncPeerCount, stub_, std::move (request), grpc_context_, on_disconnect_, *channel_, " sentry " );
190
191
auto result = static_cast <size_t >(reply.count ());
191
192
co_return result;
192
193
}
@@ -195,7 +196,7 @@ class SentryClientImpl final : public api::Service {
195
196
Task<std::optional<PeerInfo>> peer_by_id (EccPublicKey public_key) override {
196
197
proto::PeerByIdRequest request;
197
198
request.mutable_peer_id ()->CopyFrom (interfaces::peer_id_from_public_key (public_key));
198
- proto::PeerByIdReply reply = co_await sw_rpc::unary_rpc_with_retries (&Stub::AsyncPeerById, stub_, std::move (request), grpc_context_, on_disconnect_, *channel_);
199
+ proto::PeerByIdReply reply = co_await sw_rpc::unary_rpc_with_retries (&Stub::AsyncPeerById, stub_, std::move (request), grpc_context_, on_disconnect_, *channel_, " sentry " );
199
200
auto result = interfaces::peer_info_opt_from_proto_peer_reply (reply);
200
201
co_return result;
201
202
}
@@ -205,7 +206,7 @@ class SentryClientImpl final : public api::Service {
205
206
proto::PenalizePeerRequest request;
206
207
request.mutable_peer_id ()->CopyFrom (interfaces::peer_id_from_public_key (public_key));
207
208
request.set_penalty (proto::PenaltyKind::Kick);
208
- co_await sw_rpc::unary_rpc_with_retries (&Stub::AsyncPenalizePeer, stub_, std::move (request), grpc_context_, on_disconnect_, *channel_);
209
+ co_await sw_rpc::unary_rpc_with_retries (&Stub::AsyncPenalizePeer, stub_, std::move (request), grpc_context_, on_disconnect_, *channel_, " sentry " );
209
210
}
210
211
211
212
// rpc PeerEvents(PeerEventsRequest) returns (stream PeerEvent);
@@ -225,6 +226,7 @@ class SentryClientImpl final : public api::Service {
225
226
grpc_context_,
226
227
on_disconnect_,
227
228
*channel_,
229
+ " sentry" ,
228
230
std::move (proto_consumer));
229
231
}
230
232
0 commit comments