@@ -73,19 +73,19 @@ bool block_service::start()
7373void block_service::work ()
7474{
7575 zmq::socket xpub (authenticator_, role::extended_publisher, external_);
76- zmq::socket xsub (authenticator_, role::puller, internal_);
76+ zmq::socket puller (authenticator_, role::puller, internal_);
7777
7878 // Bind sockets to the service and worker endpoints.
79- if (!started (bind (xpub, xsub )))
79+ if (!started (bind (xpub, puller )))
8080 return ;
8181
8282 // TODO: tap in to failure conditions, such as high water.
8383 // BUGBUG: stop is insufficient to stop the worker, because of relay().
8484 // Relay messages between subscriber and publisher (blocks on context).
85- relay (xpub, xsub );
85+ relay (xpub, puller );
8686
8787 // Unbind the sockets and exit this thread.
88- finished (unbind (xpub, xsub ));
88+ finished (unbind (xpub, puller ));
8989}
9090
9191// Bind/Unbind.
@@ -176,11 +176,11 @@ void block_service::publish_blocks(uint32_t fork_height,
176176 if (stopped ())
177177 return ;
178178
179- zmq::socket publisher (authenticator_, role::pusher, internal_);
179+ zmq::socket pusher (authenticator_, role::pusher, internal_);
180180
181181 // Subscriptions are off the pub-sub thread so this must connect back.
182182 // This could be optimized by caching the socket as thread static.
183- const auto ec = publisher .connect (worker_);
183+ const auto ec = pusher .connect (worker_);
184184
185185 if (ec == error::service_stopped)
186186 return ;
@@ -194,14 +194,14 @@ void block_service::publish_blocks(uint32_t fork_height,
194194 }
195195
196196 for (const auto block: *blocks)
197- publish_block (publisher , ++fork_height, block);
197+ publish_block (pusher , ++fork_height, block);
198198}
199199
200200// [ height:4 ]
201201// [ block ]
202202// The payload for block publication is delimited within the zeromq message.
203203// This is required for compatability and inconsistent with query payloads.
204- void block_service::publish_block (zmq::socket& publisher , size_t height,
204+ void block_service::publish_block (zmq::socket& pusher , size_t height,
205205 block_const_ptr block)
206206{
207207 if (stopped ())
@@ -215,7 +215,7 @@ void block_service::publish_block(zmq::socket& publisher, size_t height,
215215 broadcast.enqueue_little_endian (static_cast <uint32_t >(height));
216216 broadcast.enqueue (block->to_data (bc::message::version::level::canonical));
217217
218- const auto ec = publisher .send (broadcast);
218+ const auto ec = pusher .send (broadcast);
219219
220220 if (ec == error::service_stopped)
221221 return ;
0 commit comments