mirror of
https://github.com/mimblewimble/grin.git
synced 2025-01-20 19:11:08 +03:00
Fix get_header_for_output for genesis (#2192)
This commit is contained in:
parent
5faeeedf65
commit
cab438efcb
1 changed files with 3 additions and 0 deletions
|
@ -1139,6 +1139,9 @@ impl Chain {
|
|||
loop {
|
||||
let search_height = max - (max - min) / 2;
|
||||
let h = txhashset.get_header_by_height(search_height)?;
|
||||
if search_height == 0 {
|
||||
return Ok(h);
|
||||
}
|
||||
let h_prev = txhashset.get_header_by_height(search_height - 1)?;
|
||||
if pos > h.output_mmr_size {
|
||||
min = search_height;
|
||||
|
|
Loading…
Reference in a new issue