mirror of
https://github.com/mimblewimble/grin.git
synced 2025-01-21 11:31:08 +03:00
TODO cleanup, locator made faster by header cache in chain store
This commit is contained in:
parent
41e20056d4
commit
1e7e312cf3
1 changed files with 0 additions and 4 deletions
|
@ -352,10 +352,6 @@ fn needs_syncing(
|
||||||
/// Even if sync_head is significantly out of date we will "reset" it once we
|
/// Even if sync_head is significantly out of date we will "reset" it once we
|
||||||
/// start getting headers back from a peer.
|
/// start getting headers back from a peer.
|
||||||
///
|
///
|
||||||
/// TODO - this gets *expensive* with a large header chain to iterate over
|
|
||||||
/// as we need to get each block header from the db
|
|
||||||
/// can we add a get_block_header_by_height(height, hash) ???
|
|
||||||
///
|
|
||||||
fn get_locator(chain: Arc<chain::Chain>) -> Result<Vec<Hash>, Error> {
|
fn get_locator(chain: Arc<chain::Chain>) -> Result<Vec<Hash>, Error> {
|
||||||
let tip = chain.get_sync_head()?;
|
let tip = chain.get_sync_head()?;
|
||||||
let heights = get_locator_heights(tip.height);
|
let heights = get_locator_heights(tip.height);
|
||||||
|
|
Loading…
Reference in a new issue