diff options
| author | Alexander Blair <snipa@jagtech.io> | 2020-12-10 17:41:59 -0800 |
|---|---|---|
| committer | Alexander Blair <snipa@jagtech.io> | 2020-12-10 17:41:59 -0800 |
| commit | 28e5e4298660cb483da62ac882f5dcdd74b3480c (patch) | |
| tree | 78af8c6ce230d5d2c8e1fdb6a3eb70cec034aba3 /src/rpc | |
| parent | 5b62a6f316ecd042fafea3014960bc844ee28eee (diff) | |
| parent | d660f22ed1aa544750e57b6f90fcf4e3e2ded038 (diff) | |
| download | monzero-core-28e5e4298660cb483da62ac882f5dcdd74b3480c.tar.gz monzero-core-28e5e4298660cb483da62ac882f5dcdd74b3480c.tar.xz monzero-core-28e5e4298660cb483da62ac882f5dcdd74b3480c.zip | |
Merge pull request #7110
d660f22ed protocol: drop origin IP if a block fails to verify in sync mode (moneromooo-monero)
Diffstat (limited to 'src/rpc')
| -rw-r--r-- | src/rpc/core_rpc_server.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp index 264a50040..144ffe888 100644 --- a/src/rpc/core_rpc_server.cpp +++ b/src/rpc/core_rpc_server.cpp @@ -2914,11 +2914,7 @@ namespace cryptonote block_queue.foreach([&](const cryptonote::block_queue::span &span) { const std::string span_connection_id = epee::string_tools::pod_to_hex(span.connection_id); uint32_t speed = (uint32_t)(100.0f * block_queue.get_speed(span.connection_id) + 0.5f); - std::string address = ""; - for (const auto &c: m_p2p.get_payload_object().get_connections()) - if (c.connection_id == span_connection_id) - address = c.address; - res.spans.push_back({span.start_block_height, span.nblocks, span_connection_id, (uint32_t)(span.rate + 0.5f), speed, span.size, address}); + res.spans.push_back({span.start_block_height, span.nblocks, span_connection_id, (uint32_t)(span.rate + 0.5f), speed, span.size, span.origin.str()}); return true; }); res.overview = block_queue.get_overview(res.height); |
