mirror of
https://github.com/mimblewimble/grin.git
synced 2025-02-01 08:51:08 +03:00
set tail height to include genesis (#3773)
This commit is contained in:
parent
5e2aa59a15
commit
5dcbe96d5c
1 changed files with 7 additions and 0 deletions
|
@ -152,11 +152,18 @@ impl BlockHandler {
|
||||||
max = BLOCK_TRANSFER_LIMIT;
|
max = BLOCK_TRANSFER_LIMIT;
|
||||||
}
|
}
|
||||||
let tail_height = self.get_tail_height()?;
|
let tail_height = self.get_tail_height()?;
|
||||||
|
let orig_start_height = start_height;
|
||||||
|
|
||||||
if start_height < tail_height {
|
if start_height < tail_height {
|
||||||
start_height = tail_height;
|
start_height = tail_height;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// In full archive node, tail will be set to 1, so include genesis block as well
|
||||||
|
// for consistency
|
||||||
|
if start_height == 1 && orig_start_height == 0 {
|
||||||
|
start_height = 0;
|
||||||
|
}
|
||||||
|
|
||||||
let mut result_set = BlockListing {
|
let mut result_set = BlockListing {
|
||||||
last_retrieved_height: 0,
|
last_retrieved_height: 0,
|
||||||
blocks: vec![],
|
blocks: vec![],
|
||||||
|
|
Loading…
Reference in a new issue