mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 15:37:56 -05:00
Massive code cleanup (#10913)
* Massive code cleanup * fix test issues * remove GetGenesis mock expectations * unused receiver * rename unused params Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
@@ -39,7 +39,7 @@ type node struct {
|
||||
|
||||
func main() {
|
||||
flag.Parse()
|
||||
db, err := db.NewDB(context.Background(), *datadir, &kv.Config{})
|
||||
database, err := db.NewDB(context.Background(), *datadir, &kv.Config{})
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
@@ -51,7 +51,7 @@ func main() {
|
||||
startSlot := types.Slot(*startSlot)
|
||||
endSlot := types.Slot(*endSlot)
|
||||
filter := filters.NewFilter().SetStartSlot(startSlot).SetEndSlot(endSlot)
|
||||
blks, roots, err := db.Blocks(context.Background(), filter)
|
||||
blks, roots, err := database.Blocks(context.Background(), filter)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
@@ -63,7 +63,7 @@ func main() {
|
||||
r := roots[i]
|
||||
m[r] = &node{score: make(map[uint64]bool)}
|
||||
|
||||
state, err := db.State(context.Background(), r)
|
||||
state, err := database.State(context.Background(), r)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
@@ -71,11 +71,11 @@ func main() {
|
||||
// If the state is not available, roll back
|
||||
for state == nil {
|
||||
slot--
|
||||
_, rts, err := db.BlockRootsBySlot(context.Background(), slot)
|
||||
_, rts, err := database.BlockRootsBySlot(context.Background(), slot)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
state, err = db.State(context.Background(), rts[0])
|
||||
state, err = database.State(context.Background(), rts[0])
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user