diff options
| author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-07-11 21:48:54 +0100 |
|---|---|---|
| committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-08-07 09:33:17 +0100 |
| commit | f57ee382b812e0dcd103023135934e601f9582aa (patch) | |
| tree | fe48194efb3a3cda2d16594802ea807a23d347e3 /src/cryptonote_protocol/block_queue.h | |
| parent | 90df52e12f4fbf40cb475670f1d325e03abbf327 (diff) | |
| download | monzero-core-f57ee382b812e0dcd103023135934e601f9582aa.tar.gz monzero-core-f57ee382b812e0dcd103023135934e601f9582aa.tar.xz monzero-core-f57ee382b812e0dcd103023135934e601f9582aa.zip | |
cryptonote_protocol: retry stale spans early
Connections can be dropped by the net_node layer,
unbeknownst to cryptonote_protocol, which would then
not flush any spans scheduled to that connection,
which would cause it to be only downloaded again
once it becomes the next span (possibly after a small
delay if it had been requested less than 5 seconds
ago).
Diffstat (limited to 'src/cryptonote_protocol/block_queue.h')
| -rw-r--r-- | src/cryptonote_protocol/block_queue.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cryptonote_protocol/block_queue.h b/src/cryptonote_protocol/block_queue.h index 317566b16..c75ebc0b9 100644 --- a/src/cryptonote_protocol/block_queue.h +++ b/src/cryptonote_protocol/block_queue.h @@ -70,6 +70,7 @@ namespace cryptonote void add_blocks(uint64_t height, std::list<cryptonote::block_complete_entry> bcel, const boost::uuids::uuid &connection_id, float rate, size_t size); void add_blocks(uint64_t height, uint64_t nblocks, const boost::uuids::uuid &connection_id, boost::posix_time::ptime time = boost::date_time::min_date_time); void flush_spans(const boost::uuids::uuid &connection_id, bool all = false); + void flush_stale_spans(const std::set<boost::uuids::uuid> &live_connections); void remove_span(uint64_t start_block_height); void remove_spans(const boost::uuids::uuid &connection_id, uint64_t start_block_height); void mark_last_block(uint64_t last_block_height); |
