mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-22 11:41:19 +00:00
17c07c50a5
* debug * debug * it works * rename clique bucket * remove genesis special case * copy snapshot * remove debug * migration * debug * regenerate snapshots * simplify * regeneration * after merge * tests Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
27 lines
685 B
Go
27 lines
685 B
Go
package migrations
|
|
|
|
import (
|
|
"github.com/ledgerwatch/turbo-geth/common/dbutils"
|
|
"github.com/ledgerwatch/turbo-geth/common/etl"
|
|
"github.com/ledgerwatch/turbo-geth/ethdb"
|
|
)
|
|
|
|
var removeCliqueBucket = Migration{
|
|
Name: "remove_clique_bucket",
|
|
Up: func(db ethdb.Database, tmpdir string, progress []byte, CommitProgress etl.LoadCommitHandler) (err error) {
|
|
|
|
if exists, err := db.(ethdb.BucketsMigrator).BucketExists(dbutils.CliqueBucket); err != nil {
|
|
return err
|
|
} else if !exists {
|
|
return CommitProgress(db, nil, true)
|
|
}
|
|
|
|
if err := db.(ethdb.BucketsMigrator).DropBuckets(dbutils.CliqueBucket); err != nil {
|
|
return err
|
|
}
|
|
|
|
return CommitProgress(db, nil, true)
|
|
},
|
|
|
|
}
|