diff --git a/chain/src/chain.rs b/chain/src/chain.rs index 70ab100ec..97e86ea9d 100644 --- a/chain/src/chain.rs +++ b/chain/src/chain.rs @@ -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;