mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 12:57:18 +00:00
10fffa6e7c
* add in flags * add sync and db items * bring over all other changes * enable on * use feature flag * powchain * builds * fix up tests * pass iface * gaz * enable bellatrix blind in unmarshal only behind flag * poolside * pass rpc tests * rebuilds * naming * cleaner func * check needs resync * idiomatic * gaz * rem * build * nicer * build * cleaner * surface error * wrapping * unmarshal logs * fix up * cleaner * log * builds * Update beacon-chain/blockchain/execution_engine.go Co-authored-by: terencechain <terence@prysmaticlabs.com> * terence feedback * test added for resync * nil check * fmt Co-authored-by: terencechain <terence@prysmaticlabs.com>
29 lines
512 B
Go
29 lines
512 B
Go
package kv
|
|
|
|
import (
|
|
"context"
|
|
|
|
bolt "go.etcd.io/bbolt"
|
|
)
|
|
|
|
var migrationCompleted = []byte("done")
|
|
|
|
type migration func(context.Context, *bolt.DB) error
|
|
|
|
var migrations = []migration{
|
|
migrateArchivedIndex,
|
|
migrateBlockSlotIndex,
|
|
migrateStateValidators,
|
|
migrateBlindedBeaconBlocksEnabled,
|
|
}
|
|
|
|
// RunMigrations defined in the migrations array.
|
|
func (s *Store) RunMigrations(ctx context.Context) error {
|
|
for _, m := range migrations {
|
|
if err := m(ctx, s.db); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
return nil
|
|
}
|