Skip to content

Commit

Permalink
Unreverse write_short_hash (see compensating change in -client).
Browse files Browse the repository at this point in the history
  • Loading branch information
evoskuil committed Dec 13, 2014
1 parent 25fae98 commit e44cc97
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions include/bitcoin/bitcoin/impl/utility/serializer.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,7 @@ void serializer<Iterator>::write_hash(const hash_digest& hash)
template <typename Iterator>
void serializer<Iterator>::write_short_hash(const short_hash& hash)
{
// There is no reason for this to be reversed!
// The only reason it is still reversed is because the old
// obelisk protocol expects it that way.
// Fortunately, the old obelisk protocol is the only thing
// that currently uses this function.
write_data_reverse(hash);
write_data(hash);
}

template <typename Iterator>
Expand Down Expand Up @@ -273,8 +268,7 @@ hash_digest deserializer<Iterator, SafeCheckLast>::read_hash()
template <typename Iterator, bool SafeCheckLast>
short_hash deserializer<Iterator, SafeCheckLast>::read_short_hash()
{
// See the note in serializer::write_short_hash:
return read_bytes_reverse<short_hash_size>();
return read_bytes<short_hash_size>();
}

template <typename Iterator, bool SafeCheckLast>
Expand Down

0 comments on commit e44cc97

Please sign in to comment.