summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorevoskuil <eric@voskuil.org>2014-04-22 22:37:41 (GMT)
committer evoskuil <eric@voskuil.org>2014-04-22 22:37:41 (GMT)
commit75a3c4f5375ee68fc433dedce0f5b1e6ab171def (patch)
treed9f986044cc30efb74e40e5f9b494fb7885b6378
parent655b027d00cd5f31b7b509994791024e1ee5d2af (diff)
parentd46a494d5ffb136b4caa14c7195b6b01d0250e2a (diff)
Merge pull request #2 from evoskuil/develop
Update hash_digest_size to work with libbitcoin changes.
-rw-r--r--builds/msvc/vs2013/obelisk.import.props2
-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
6 files changed, 7 insertions, 7 deletions
diff --git a/builds/msvc/vs2013/obelisk.import.props b/builds/msvc/vs2013/obelisk.import.props
index 4baef0b..7b7614a 100644
--- a/builds/msvc/vs2013/obelisk.import.props
+++ b/builds/msvc/vs2013/obelisk.import.props
@@ -17,7 +17,7 @@
<ClCompile>
<AdditionalIncludeDirectories>$(ProjectDir)..\..\..\..\..\obelisk\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="$(Configuration.IndexOf('Release')) != -1">BITCOIN_DISABLE_ASSERTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Linkage-obelisk)' == 'static' Or '$(Linkage-obelisk)' == 'ltcg'">OBELISK_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Linkage-obelisk)' == 'static' Or '$(Linkage-obelisk)' == 'ltcg'">BCS_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
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());