@@ -44,9 +44,11 @@ namespace iroha {
44
44
auto OnDemandOrderingInit::createNotificationFactory (
45
45
std::shared_ptr<network::AsyncGrpcClient<google::protobuf::Empty>>
46
46
async_call,
47
+ std::shared_ptr<TransportFactoryType> proposal_transport_factory,
47
48
std::chrono::milliseconds delay) {
48
49
return std::make_shared<ordering::transport::OnDemandOsClientGrpcFactory>(
49
50
std::move (async_call),
51
+ std::move (proposal_transport_factory),
50
52
[] { return std::chrono::system_clock::now (); },
51
53
delay);
52
54
}
@@ -55,6 +57,7 @@ namespace iroha {
55
57
std::shared_ptr<ametsuchi::PeerQueryFactory> peer_query_factory,
56
58
std::shared_ptr<network::AsyncGrpcClient<google::protobuf::Empty>>
57
59
async_call,
60
+ std::shared_ptr<TransportFactoryType> proposal_transport_factory,
58
61
std::chrono::milliseconds delay,
59
62
std::vector<shared_model::interface::types::HashType> initial_hashes) {
60
63
// since top block will be the first in notifier observable, hashes of
@@ -174,7 +177,10 @@ namespace iroha {
174
177
.map (map_peers);
175
178
176
179
return std::make_shared<ordering::OnDemandConnectionManager>(
177
- createNotificationFactory (std::move (async_call), delay), peers);
180
+ createNotificationFactory (std::move (async_call),
181
+ std::move (proposal_transport_factory),
182
+ delay),
183
+ peers);
178
184
}
179
185
180
186
auto OnDemandOrderingInit::createGate (
@@ -187,7 +193,6 @@ namespace iroha {
187
193
consensus::Round initial_round,
188
194
std::function<std::chrono::seconds(
189
195
const synchronizer::SynchronizationEvent &)> delay_func) {
190
-
191
196
auto map = [](auto commit) {
192
197
return matchEvent (
193
198
commit,
@@ -263,6 +268,7 @@ namespace iroha {
263
268
async_call,
264
269
std::shared_ptr<shared_model::interface::UnsafeProposalFactory>
265
270
proposal_factory,
271
+ std::shared_ptr<TransportFactoryType> proposal_transport_factory,
266
272
std::shared_ptr<ametsuchi::TxPresenceCache> tx_cache,
267
273
consensus::Round initial_round,
268
274
std::function<std::chrono::seconds(
@@ -274,16 +280,18 @@ namespace iroha {
274
280
std::move (transaction_factory),
275
281
std::move (batch_parser),
276
282
std::move (transaction_batch_factory));
277
- return createGate (ordering_service,
278
- createConnectionManager (std::move (peer_query_factory),
279
- std::move (async_call),
280
- delay,
281
- std::move (initial_hashes)),
282
- std::make_shared<ordering::cache::OnDemandCache>(),
283
- std::move (proposal_factory),
284
- std::move (tx_cache),
285
- initial_round,
286
- std::move (delay_func));
283
+ return createGate (
284
+ ordering_service,
285
+ createConnectionManager (std::move (peer_query_factory),
286
+ std::move (async_call),
287
+ std::move (proposal_transport_factory),
288
+ delay,
289
+ std::move (initial_hashes)),
290
+ std::make_shared<ordering::cache::OnDemandCache>(),
291
+ std::move (proposal_factory),
292
+ std::move (tx_cache),
293
+ initial_round,
294
+ std::move (delay_func));
287
295
}
288
296
289
297
} // namespace network
0 commit comments