mirror of
https://github.com/mimblewimble/grin.git
synced 2025-05-13 12:41:15 +03:00
Locator fix master (#381)
* fix chain_header_by_height error * cherry-pick and clean up
This commit is contained in:
parent
25969424ff
commit
77eac16702
1 changed files with 3 additions and 6 deletions
|
@ -283,14 +283,11 @@ impl Syncer {
|
|||
|
||||
let locator = heights
|
||||
.into_iter()
|
||||
.map(|h| {
|
||||
let header = self.chain.get_header_by_height(h).unwrap();
|
||||
header.hash()
|
||||
})
|
||||
.map(|h| self.chain.get_header_by_height(h))
|
||||
.filter(|h| h.is_ok())
|
||||
.map(|h| h.unwrap().hash())
|
||||
.collect();
|
||||
|
||||
debug!(LOGGER, "Sync: locator: {:?}", locator);
|
||||
|
||||
Ok(locator)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue