24 #include <boost/endian/conversion.hpp>
30 namespace graphene {
namespace protocol {
38 return boost::endian::endian_reverse(
id._hash[0].value());
46 tmp._hash[0] = boost::endian::endian_reverse(
block_num());
47 static_assert(
sizeof(tmp._hash[0]) == 4,
"should be 4 bytes" );
67 return signee() == expected_signee;
74 return empty_checksum;
78 vector<digest_type> ids;
83 vector<digest_type>::size_type current_number_of_hashes = ids.size();
84 while( current_number_of_hashes > 1 )
87 uint32_t i_max = current_number_of_hashes - (current_number_of_hashes&1);
90 for( uint32_t i = 0; i < i_max; i += 2 )
93 if( current_number_of_hashes&1 )
94 ids[k++] = ids[i_max];
95 current_number_of_hashes = k;