summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmir Taaki <genjix@riseup.net>2014-05-09 11:30:04 (GMT)
committer Amir Taaki <genjix@riseup.net>2014-05-09 11:30:04 (GMT)
commit9712cbaea705e048e938a0359eb4bb80896d4728 (patch)
treee7d472b7785d37060e1f2f9e3342bf057f242a20
parentce962e73bd04fe3733575c67ebb5f2c8aa2593b7 (diff)
cast_chunk and uncast_type removed from libbitcoin
-rw-r--r--src/unwrap.cpp2
-rw-r--r--src/wrap.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/unwrap.cpp b/src/unwrap.cpp
index ea507bd..009d913 100644
--- a/src/unwrap.cpp
+++ b/src/unwrap.cpp
@@ -25,7 +25,7 @@ int main(int argc, char** argv)
data_chunk rawdata(bytes.begin(), bytes.end() - 4);
data_chunk rawchecksum(bytes.end() - 4, bytes.end());
uint32_t checksum = bitcoin_checksum(rawdata);
- uint32_t my_checksum = cast_chunk<uint32_t>(rawchecksum);
+ uint32_t my_checksum = from_little_endian<uint32_t>(rawchecksum.begin());
if (checksum != my_checksum) {
std::cerr << "Error: checksum does not match" << std::endl;
return -1;
diff --git a/src/wrap.cpp b/src/wrap.cpp
index d91b8e6..cf3bdb3 100644
--- a/src/wrap.cpp
+++ b/src/wrap.cpp
@@ -36,7 +36,7 @@ int main(int argc, char** argv)
bytes.push_back(version_byte);
extend_data(bytes, decode_hex(hex_str));
uint32_t checksum = bitcoin_checksum(bytes);
- extend_data(bytes, uncast_type(checksum));
+ extend_data(bytes, to_little_endian(checksum));
std::cout << bytes << std::endl;
return 0;