diff options
author | Lee Clagett <code@leeclagett.com> | 2020-10-13 15:15:07 +0000 |
---|---|---|
committer | Lee Clagett <code@leeclagett.com> | 2020-10-10 15:28:40 +0000 |
commit | 7414e2bac11cbf9163ca16dc1b1510b4fd9a0d64 (patch) | |
tree | 1cd7aa7394630a8be218534112ba88a5b618d96a /src/cryptonote_protocol/cryptonote_protocol_handler.inl | |
parent | Merge pull request #7072 (diff) | |
download | monero-7414e2bac11cbf9163ca16dc1b1510b4fd9a0d64.tar.xz |
Change epee binary output from std::stringstream to byte_stream
Diffstat (limited to 'src/cryptonote_protocol/cryptonote_protocol_handler.inl')
-rw-r--r-- | src/cryptonote_protocol/cryptonote_protocol_handler.inl | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/cryptonote_protocol/cryptonote_protocol_handler.inl b/src/cryptonote_protocol/cryptonote_protocol_handler.inl index 25b14d903..e16c2acff 100644 --- a/src/cryptonote_protocol/cryptonote_protocol_handler.inl +++ b/src/cryptonote_protocol/cryptonote_protocol_handler.inl @@ -425,7 +425,7 @@ namespace cryptonote } //------------------------------------------------------------------------------------------------------------------------ template<class t_core> - bool t_cryptonote_protocol_handler<t_core>::get_payload_sync_data(blobdata& data) + bool t_cryptonote_protocol_handler<t_core>::get_payload_sync_data(epee::byte_slice& data) { CORE_SYNC_DATA hsd = {}; get_payload_sync_data(hsd); @@ -2586,15 +2586,15 @@ skip: // send fluffy ones first, we want to encourage people to run that if (!fluffyConnections.empty()) { - std::string fluffyBlob; - epee::serialization::store_t_to_binary(fluffy_arg, fluffyBlob); - m_p2p->relay_notify_to_list(NOTIFY_NEW_FLUFFY_BLOCK::ID, epee::strspan<uint8_t>(fluffyBlob), std::move(fluffyConnections)); + epee::byte_slice fluffyBlob; + epee::serialization::store_t_to_binary(fluffy_arg, fluffyBlob, 32 * 1024); + m_p2p->relay_notify_to_list(NOTIFY_NEW_FLUFFY_BLOCK::ID, epee::to_span(fluffyBlob), std::move(fluffyConnections)); } if (!fullConnections.empty()) { - std::string fullBlob; - epee::serialization::store_t_to_binary(arg, fullBlob); - m_p2p->relay_notify_to_list(NOTIFY_NEW_BLOCK::ID, epee::strspan<uint8_t>(fullBlob), std::move(fullConnections)); + epee::byte_slice fullBlob; + epee::serialization::store_t_to_binary(arg, fullBlob, 128 * 1024); + m_p2p->relay_notify_to_list(NOTIFY_NEW_BLOCK::ID, epee::to_span(fullBlob), std::move(fullConnections)); } return true; |