Fix get_header_for_output for genesis
@@ -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;
