mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-17 04:48:21 +00:00
Various small tree-states fixes (#4861)
* Fix block backfill with genesis skip slots * Fix freezer upper limit * Fix: write post state in lcli skip-slots (#4843) * Added CARGO_USE_GIT_CLI to the Dockerfile (#4828) * chore: replace deprecated hub with gh for releases (#4839) * Put schema version back to 24 (ignore Deneb) * Minimise diff --------- Co-authored-by: Joe Clapis <jclapis@outlook.com> Co-authored-by: Dustin Brickwood <dustinbrickwood204@gmail.com>
This commit is contained in:
@@ -72,8 +72,15 @@ impl<E: EthSpec, Hot: ItemStore<E>, Cold: ItemStore<E>> HotColdDB<E, Hot, Cold>
|
||||
let anchor_info = self.get_anchor_info();
|
||||
// There are no historic states stored if the state upper limit lies in the hot
|
||||
// database. It hasn't been reached yet, and may never be.
|
||||
if anchor_info.map_or(false, |a| a.state_upper_limit >= split_slot) {
|
||||
if anchor_info.as_ref().map_or(false, |a| {
|
||||
a.state_upper_limit >= split_slot && a.state_lower_limit == 0
|
||||
}) {
|
||||
None
|
||||
} else if let Some(lower_limit) = anchor_info
|
||||
.map(|a| a.state_lower_limit)
|
||||
.filter(|limit| *limit > 0)
|
||||
{
|
||||
Some(lower_limit)
|
||||
} else {
|
||||
// Otherwise if the state upper limit lies in the freezer or all states are
|
||||
// reconstructed then state roots are available up to the split slot.
|
||||
|
||||
@@ -4,7 +4,7 @@ use ssz::{Decode, Encode};
|
||||
use ssz_derive::{Decode, Encode};
|
||||
use types::{Checkpoint, Hash256, Slot};
|
||||
|
||||
pub const CURRENT_SCHEMA_VERSION: SchemaVersion = SchemaVersion(25);
|
||||
pub const CURRENT_SCHEMA_VERSION: SchemaVersion = SchemaVersion(24);
|
||||
|
||||
// All the keys that get stored under the `BeaconMeta` column.
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user