diff --git a/CMakeLists.txt b/CMakeLists.txt index be68c664..09e42a8e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,7 +56,7 @@ IF( WIN32 ) set(BOOST_ALL_DYN_LINK OFF) # force dynamic linking for all libraries ENDIF(WIN32) -FIND_PACKAGE(Boost 1.58 REQUIRED COMPONENTS ${BOOST_COMPONENTS}) +FIND_PACKAGE(Boost 1.57 REQUIRED COMPONENTS ${BOOST_COMPONENTS}) # For Boost 1.53 on windows, coroutine was not in BOOST_LIBRARYDIR and do not need it to build, but if boost versin >= 1.54, find coroutine otherwise will cause link errors IF(NOT "${Boost_VERSION}" MATCHES "1.53(.*)") SET(BOOST_LIBRARIES_TEMP ${Boost_LIBRARIES}) diff --git a/libraries/chain/block.cpp b/libraries/chain/block.cpp index f26fa356..1081161e 100644 --- a/libraries/chain/block.cpp +++ b/libraries/chain/block.cpp @@ -17,8 +17,7 @@ */ #include #include -#include - +#include namespace graphene { namespace chain { digest_type block_header::digest()const @@ -26,12 +25,15 @@ namespace graphene { namespace chain { return digest_type::hash(*this); } - uint32_t block_header::num_from_id(const block_id_type& id) { return boost::endian::endian_reverse(id._hash[0]); } + uint32_t block_header::num_from_id(const block_id_type& id) + { + return fc::endian_reverse_u32(id._hash[0]); + } block_id_type signed_block_header::id()const { auto tmp = fc::sha224::hash( *this ); - tmp._hash[0] = boost::endian::endian_reverse(block_num()); // store the block num in the ID, 160 bits is plenty for the hash + tmp._hash[0] = fc::endian_reverse_u32(block_num()); // store the block num in the ID, 160 bits is plenty for the hash static_assert( sizeof(tmp._hash[0]) == 4, "should be 4 bytes" ); block_id_type result; memcpy(result._hash, tmp._hash, std::min(sizeof(result), sizeof(tmp))); diff --git a/libraries/chain/transaction.cpp b/libraries/chain/transaction.cpp index ff963bcf..c4bbbfd7 100644 --- a/libraries/chain/transaction.cpp +++ b/libraries/chain/transaction.cpp @@ -17,7 +17,7 @@ */ #include #include -#include +#include namespace graphene { namespace chain { @@ -83,7 +83,7 @@ void transaction::set_expiration( fc::time_point_sec expiration_time ) void transaction::set_expiration( const block_id_type& reference_block, unsigned_int lifetime_intervals ) { - ref_block_num = boost::endian::endian_reverse(reference_block._hash[0]); + ref_block_num = fc::endian_reverse_u32(reference_block._hash[0]); ref_block_prefix = reference_block._hash[1]; relative_expiration = lifetime_intervals; block_id_cache = reference_block; diff --git a/libraries/fc b/libraries/fc index d462be0e..443544be 160000 --- a/libraries/fc +++ b/libraries/fc @@ -1 +1 @@ -Subproject commit d462be0e92a576b93a83194e9649af528162bb4a +Subproject commit 443544be4f58f47e6432a2676ff81d8b782ce1b6