aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_protocol/block_queue.h
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2017-08-25 00:21:28 +0200
committerRiccardo Spagni <ric@spagni.net>2017-08-25 00:21:28 +0200
commit335681896a8ea6142a4331aa203ce728d507265c (patch)
tree16d420256698b953684158879a540aec1866a529 /src/cryptonote_protocol/block_queue.h
parentMerge pull request #2330 (diff)
parentcryptonote_protocol: warn if we see a higher top version we expect (diff)
downloadmonero-335681896a8ea6142a4331aa203ce728d507265c.tar.xz
Merge pull request #2311
df0cffed cryptonote_protocol: warn if we see a higher top version we expect (moneromooo-monero) 317ab21a cryptonote_protocol: less strict check on top version on connect (moneromooo-monero) cc81a371 cryptonote_protocol: update target height when syncing too (moneromooo-monero) e2ad372b cryptonote_protocol: simplify and remove unnecessary casts (moneromooo-monero) 727e67ca cryptonote_protocol: print peer top height along with its version (moneromooo-monero) b5345ef4 crypto: use malloc instead of alloca (moneromooo-monero) 80794b31 thread_group: set thread size to THREAD_STACK_SIZE (moneromooo-monero) 5524bc31 print peer id in 0 padded hex for consistency (moneromooo-monero) 8f8cc09b contrib: add sync_info to rlwrap command set (moneromooo-monero) 70b8c6d7 cryptonote_protocol: misc fixes to the new sync algorithm (moneromooo-monero)
Diffstat (limited to 'src/cryptonote_protocol/block_queue.h')
-rw-r--r--src/cryptonote_protocol/block_queue.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cryptonote_protocol/block_queue.h b/src/cryptonote_protocol/block_queue.h
index fa1a0f217..13d4619bf 100644
--- a/src/cryptonote_protocol/block_queue.h
+++ b/src/cryptonote_protocol/block_queue.h
@@ -71,7 +71,7 @@ namespace cryptonote
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);
+ bool remove_span(uint64_t start_block_height, std::list<crypto::hash> *hashes = NULL);
void remove_spans(const boost::uuids::uuid &connection_id, uint64_t start_block_height);
uint64_t get_max_block_height() const;
void print() const;
@@ -82,6 +82,7 @@ namespace cryptonote
std::pair<uint64_t, uint64_t> get_next_span_if_scheduled(std::list<crypto::hash> &hashes, boost::uuids::uuid &connection_id, boost::posix_time::ptime &time) const;
void set_span_hashes(uint64_t start_height, const boost::uuids::uuid &connection_id, std::list<crypto::hash> hashes);
bool get_next_span(uint64_t &height, std::list<cryptonote::block_complete_entry> &bcel, boost::uuids::uuid &connection_id, bool filled = true) const;
+ bool has_next_span(const boost::uuids::uuid &connection_id, bool &filled) const;
size_t get_data_size() const;
size_t get_num_filled_spans_prefix() const;
size_t get_num_filled_spans() const;