diff options
| author | luigi1111 <luigi1111w@gmail.com> | 2020-12-12 22:05:41 -0600 |
|---|---|---|
| committer | luigi1111 <luigi1111w@gmail.com> | 2020-12-12 22:05:41 -0600 |
| commit | 54a4071473432f30b83638a98779941e0b164f39 (patch) | |
| tree | 09c4b527507e3db07a1a83c8700c008b4f21b8d8 /src/cryptonote_protocol/cryptonote_protocol_handler.inl | |
| parent | 4f70af3af1344f4d45b39ca30913bbb47baff80a (diff) | |
| parent | c1d654708fc6e72997cc05a8df3b3fcec37b26be (diff) | |
| download | monzero-core-0.17.1.7.tar.gz monzero-core-0.17.1.7.tar.xz monzero-core-0.17.1.7.zip | |
Merge pull request #7131v0.17.1.7
c1d6547 protocol: include first new block in chain entry response (moneromooo-monero)
Diffstat (limited to 'src/cryptonote_protocol/cryptonote_protocol_handler.inl')
| -rw-r--r-- | src/cryptonote_protocol/cryptonote_protocol_handler.inl | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/cryptonote_protocol/cryptonote_protocol_handler.inl b/src/cryptonote_protocol/cryptonote_protocol_handler.inl index b537ee254..d4c3b51c3 100644 --- a/src/cryptonote_protocol/cryptonote_protocol_handler.inl +++ b/src/cryptonote_protocol/cryptonote_protocol_handler.inl @@ -1826,6 +1826,16 @@ skip: LOG_ERROR_CCONTEXT("Failed to handle NOTIFY_REQUEST_CHAIN."); return 1; } + if (r.m_block_ids.size() >= 2) + { + cryptonote::block b; + if (!m_core.get_block_by_hash(r.m_block_ids[1], b)) + { + LOG_ERROR_CCONTEXT("Failed to handle NOTIFY_REQUEST_CHAIN: first block not found"); + return 1; + } + r.first_block = cryptonote::block_to_blob(b); + } MLOG_P2P_MESSAGE("-->>NOTIFY_RESPONSE_CHAIN_ENTRY: m_start_height=" << r.start_height << ", m_total_height=" << r.total_height << ", m_block_ids.size()=" << r.m_block_ids.size()); post_notify<NOTIFY_RESPONSE_CHAIN_ENTRY>(r, context); return 1; |
