| 409 | } |
| 410 | |
| 411 | Height BlockChain::get_timestamp_lower_bound_height(Timestamp ts) const { |
| 412 | auto middle = common::write_varint_sqlite4(ts); |
| 413 | DB::Cursor cur = m_db.begin(TIMESTAMP_BLOCK_PREFIX, middle); |
| 414 | if (cur.end()) |
| 415 | return m_tip_height + 1; |
| 416 | const char *be = cur.get_suffix().data(); |
| 417 | const char *en = be + cur.get_suffix().size(); |
| 418 | common::read_varint_sqlite4(be, en); // We ignore result, auto actual_ts = |
| 419 | return common::integer_cast<Height>(common::read_varint_sqlite4(be, en)); |
| 420 | } |
| 421 | |
| 422 | std::vector<Hash> BlockChain::get_sync_headers_chain( |
| 423 | const std::vector<Hash> &locator, Height *start_height, size_t max_count) const { |
no test coverage detected