mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-08 04:54:05 -05:00
Integrate state-diff into State() (#16033)
**What type of PR is this?** Feature **What does this PR do? Why is it needed?** This PR integrates the state diff path into the `State()` function from `db/kv`, which allows reading of states using the state diff db, when the `EnableStateDiff` flag is enabled. **Notes for reviewers:** Files `kv/state_diff_test.go` and `config/features/config.go` only contain renamings: - `kv/state_diff_test.go`: rename `setDefaultExponents()` to `setDefaultStateDiffExponents()` to be less vague. - `config/features/config.go`: rename `enableStateDiff` to `EnableStateDiff` to make it public.
This commit is contained in:
@@ -286,8 +286,8 @@ func ConfigureBeaconChain(ctx *cli.Context) error {
|
||||
cfg.DisableLastEpochTargets = true
|
||||
}
|
||||
|
||||
if ctx.IsSet(enableStateDiff.Name) {
|
||||
logEnabled(enableStateDiff)
|
||||
if ctx.IsSet(EnableStateDiff.Name) {
|
||||
logEnabled(EnableStateDiff)
|
||||
cfg.EnableStateDiff = true
|
||||
|
||||
if ctx.IsSet(enableHistoricalSpaceRepresentation.Name) {
|
||||
|
||||
@@ -172,7 +172,7 @@ var (
|
||||
Name: "enable-experimental-attestation-pool",
|
||||
Usage: "Enables an experimental attestation pool design.",
|
||||
}
|
||||
enableStateDiff = &cli.BoolFlag{
|
||||
EnableStateDiff = &cli.BoolFlag{
|
||||
Name: "enable-state-diff",
|
||||
Usage: "Enables the experimental state diff feature.",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user