Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
Giulio2002 committed Dec 25, 2024
1 parent 4d7791c commit ff3e668
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions cmd/integration/commands/state_domains.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,16 @@ func init() {

withDataDir(purifyDomains)
purifyDomains.Flags().StringVar(&purifyDir, "purifiedDomain", "purified-output", "")
purifyDomains.Flags().BoolVar(&purifyOnlyCommitment, "commitment", false, "purify only commitment domain")
rootCmd.AddCommand(purifyDomains)
}

// if trie variant is not hex, we could not have another rootHash with to verify it
var (
stepSize uint64
lastStep uint64
purifyDir string
stepSize uint64
lastStep uint64
purifyDir string
purifyOnlyCommitment bool
)

// write command to just seek and query state by addr and domain from state db and files (if any)
Expand Down Expand Up @@ -155,8 +157,12 @@ var purifyDomains = &cobra.Command{

purifyDB := mdbx.MustOpen(tmpDir)
defer purifyDB.Close()

purificationDomains := []string{"account", "storage" /*"code",*/, "commitment", "receipt"}
var purificationDomains []string
if purifyOnlyCommitment {
purificationDomains = []string{"commitment"}
} else {
purificationDomains = []string{"account", "storage" /*"code",*/, "commitment", "receipt"}
}
//purificationDomains := []string{"commitment"}
for _, domain := range purificationDomains {
if err := makePurifiableIndexDB(purifyDB, dirs, log.New(), domain); err != nil {
Expand Down

0 comments on commit ff3e668

Please sign in to comment.