summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorevoskuil <eric@voskuil.org>2014-04-22 09:05:47 (GMT)
committer evoskuil <eric@voskuil.org>2014-04-22 09:05:47 (GMT)
commitd46a494d5ffb136b4caa14c7195b6b01d0250e2a (patch)
treed9f986044cc30efb74e40e5f9b494fb7885b6378
parent105a98bb43e38d809984d06c3a35ee630e67f8f5 (diff)
change hash_digest_size to hash_size (to match libbitcoin export).
-rw-r--r--src/client/interface/client_blockchain.cpp4
-rw-r--r--src/client/interface/client_fetch_x.cpp2
-rw-r--r--src/client/interface/client_interface.cpp2
-rw-r--r--src/worker/service/blockchain.cpp2
-rw-r--r--src/worker/subscribe_manager.cpp2
5 files changed, 6 insertions, 6 deletions
diff --git a/src/client/interface/client_blockchain.cpp b/src/client/interface/client_blockchain.cpp
index 7947af1..571852a 100644
--- a/src/client/interface/client_blockchain.cpp
+++ b/src/client/interface/client_blockchain.cpp
@@ -67,7 +67,7 @@ void blockchain_interface::fetch_block_header(size_t height,
void blockchain_interface::fetch_block_header(const hash_digest& blk_hash,
blockchain::fetch_handler_block_header handle_fetch)
{
- data_chunk data(hash_digest_size);
+ data_chunk data(hash_size);
auto serial = make_serializer(data.begin());
serial.write_hash(blk_hash);
BITCOIN_ASSERT(serial.iterator() == data.end());
@@ -92,7 +92,7 @@ void wrap_fetch_transaction_index(const data_chunk& data,
void blockchain_interface::fetch_transaction_index(const hash_digest& tx_hash,
blockchain::fetch_handler_transaction_index handle_fetch)
{
- data_chunk data(hash_digest_size);
+ data_chunk data(hash_size);
auto serial = make_serializer(data.begin());
serial.write_hash(tx_hash);
BITCOIN_ASSERT(serial.iterator() == data.end());
diff --git a/src/client/interface/client_fetch_x.cpp b/src/client/interface/client_fetch_x.cpp
index 21714ff..dae6f7d 100644
--- a/src/client/interface/client_fetch_x.cpp
+++ b/src/client/interface/client_fetch_x.cpp
@@ -53,7 +53,7 @@ void receive_history_result(const data_chunk& data,
void wrap_fetch_transaction_args(data_chunk& data, const hash_digest& tx_hash)
{
- data.resize(hash_digest_size);
+ data.resize(hash_size);
auto serial = make_serializer(data.begin());
serial.write_hash(tx_hash);
BITCOIN_ASSERT(serial.iterator() == data.end());
diff --git a/src/client/interface/client_interface.cpp b/src/client/interface/client_interface.cpp
index badabfd..ba388bf 100644
--- a/src/client/interface/client_interface.cpp
+++ b/src/client/interface/client_interface.cpp
@@ -191,7 +191,7 @@ void address_subscriber::receive_update(
const data_chunk& data, const worker_uuid& worker)
{
// Deserialize data -> address, height, block hash, tx
- constexpr size_t info_size = 1 + short_hash_size + 4 + hash_digest_size;
+ constexpr size_t info_size = 1 + short_hash_size + 4 + hash_size;
auto deserial = make_deserializer(data.begin(), data.begin() + info_size);
// [ addr,version ] (1 byte)
uint8_t version_byte = deserial.read_byte();
diff --git a/src/worker/service/blockchain.cpp b/src/worker/service/blockchain.cpp
index 597d97c..7d617be 100644
--- a/src/worker/service/blockchain.cpp
+++ b/src/worker/service/blockchain.cpp
@@ -177,7 +177,7 @@ void block_transaction_hashes_fetched(const std::error_code& ec,
const hash_digest_list& hashes,
const incoming_message& request, queue_send_callback queue_send)
{
- data_chunk result(4 + hash_digest_size * hashes.size());
+ data_chunk result(4 + hash_size * hashes.size());
auto serial = make_serializer(result.begin());
write_error_code(serial, ec);
BITCOIN_ASSERT(serial.iterator() == result.begin() + 4);
diff --git a/src/worker/subscribe_manager.cpp b/src/worker/subscribe_manager.cpp
index 625c49d..328b4f0 100644
--- a/src/worker/subscribe_manager.cpp
+++ b/src/worker/subscribe_manager.cpp
@@ -171,7 +171,7 @@ void subscribe_manager::post_updates(const payment_address& address,
// [ height ] (4 bytes)
// [ block_hash ] (32 bytes)
// [ tx ]
- constexpr size_t info_size = 1 + short_hash_size + 4 + hash_digest_size;
+ constexpr size_t info_size = 1 + short_hash_size + 4 + hash_size;
data_chunk data(info_size + satoshi_raw_size(tx));
auto serial = make_serializer(data.begin());
serial.write_byte(address.version());