summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmir Taaki <genjix@riseup.net>2014-03-27 14:47:08 (GMT)
committer Amir Taaki <genjix@riseup.net>2014-03-27 14:47:08 (GMT)
commit5caa8cbc850fec08534c681845bfe3c4672c14bc (patch)
tree2cddf52b4e34a8c9c98419cc764caa60ce78cfad
parent16c81b855475105d616b30542104d8ee6a1acf30 (diff)
fixed return type for values which are not needed.
-rw-r--r--src/worker/publisher.cpp10
-rw-r--r--src/worker/publisher.hpp4
2 files changed, 6 insertions, 8 deletions
diff --git a/src/worker/publisher.cpp b/src/worker/publisher.cpp
index 8ad454d..82f50f0 100644
--- a/src/worker/publisher.cpp
+++ b/src/worker/publisher.cpp
@@ -50,7 +50,7 @@ void append_hash(czmqpp::message& message, const hash_digest& hash)
message.append(data_chunk(hash.begin(), hash.end()));
}
-bool publisher::send_blk(uint32_t height, const block_type& blk)
+void publisher::send_blk(uint32_t height, const block_type& blk)
{
// Serialize the height.
data_chunk raw_height = bc::uncast_type(height);
@@ -75,12 +75,11 @@ bool publisher::send_blk(uint32_t height, const block_type& blk)
if (!message.send(socket_block_))
{
log_warning(LOG_PUBLISHER) << "Problem publishing block data.";
- return false;
+ return;
}
- return true;
}
-bool publisher::send_tx(const transaction_type& tx)
+void publisher::send_tx(const transaction_type& tx)
{
data_chunk raw_tx(bc::satoshi_raw_size(tx));
auto it = satoshi_save(tx, raw_tx.begin());
@@ -90,9 +89,8 @@ bool publisher::send_tx(const transaction_type& tx)
if (!message.send(socket_tx_))
{
log_warning(LOG_PUBLISHER) << "Problem publishing tx data.";
- return false;
+ return;
}
- return true;
}
} // namespace obelisk
diff --git a/src/worker/publisher.hpp b/src/worker/publisher.hpp
index ca18d45..fcff4f8 100644
--- a/src/worker/publisher.hpp
+++ b/src/worker/publisher.hpp
@@ -20,8 +20,8 @@ private:
bool setup_socket(
const std::string& connection, czmqpp::socket& socket);
- bool send_blk(uint32_t height, const bc::block_type& blk);
- bool send_tx(const bc::transaction_type& tx);
+ void send_blk(uint32_t height, const bc::block_type& blk);
+ void send_tx(const bc::transaction_type& tx);
node_impl& node_;
czmqpp::context context_;