Skip to content

Commit

Permalink
block_header serialization changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
pmienk committed Jul 11, 2015
1 parent d269579 commit 218a22c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/publisher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ void publisher::send_blk(uint32_t height, const chain::block& blk)
BITCOIN_ASSERT(raw_height.size() == sizeof(uint32_t));

// Serialize the 80 byte header.
data_chunk raw_blk_header = blk.header.to_data();
data_chunk raw_blk_header = blk.header.to_data(false);
BITCOIN_ASSERT(raw_blk_header.size() == 80);

// Construct the message.
Expand Down
4 changes: 2 additions & 2 deletions src/service/blockchain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,12 @@ void block_header_fetched(const std::error_code& ec,
const chain::block_header& blk,
const incoming_message& request, queue_send_callback queue_send)
{
data_chunk result(4 + blk.satoshi_size());
data_chunk result(4 + blk.satoshi_size(false));
auto serial = make_serializer(result.begin());
write_error_code(serial, ec);
BITCOIN_ASSERT(serial.iterator() == result.begin() + 4);

data_chunk blk_data = blk.to_data();
data_chunk blk_data = blk.to_data(false);
serial.write_data(blk_data);
BITCOIN_ASSERT(serial.iterator() == result.end());

Expand Down

0 comments on commit 218a22c

Please sign in to comment.