zcash_client_backend: Fix `scan_cached_blocks` panic with genesis block
If `from_height = 0` and `limit > 1`, then the conditional being used to initialise `continuity_check_metadata` was previously running for every block, and would therefore panic while processing the block at height 1.
This commit is contained in:
parent
44abd3450b
commit
d3fc9670d5
|
@ -302,7 +302,7 @@ where
|
|||
return Err(Error::Scan(scan_error));
|
||||
}
|
||||
|
||||
if from_height == BlockHeight::from(0) {
|
||||
if block.height() == BlockHeight::from(0) {
|
||||
// We can always derive a valid `continuity_check_metadata` for the
|
||||
// genesis block, even if the block source doesn't have
|
||||
// `sapling_commitment_tree_size`. So briefly set it to a dummy value that
|
||||
|
|
Loading…
Reference in New Issue