mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-01 00:31:21 +00:00
462edc2345
* Start from 9m7 * Regenerate IH + receipts * Only stats for iH bucket * Persist receipts * Go all in * Start from block 10m * Convert DbState to use plain state * Fix findHistory * Hard-code export * More fixes * Fix test * Fix formatting * Introduce PlainDbState * Actually return PlainDbState * Fix formatting * Fix name style lint * Fix linters * Fix history_test * Fix blockchain_test * Fix compile error * Bucket stats from all buckets
30 lines
1.1 KiB
Go
30 lines
1.1 KiB
Go
package commands
|
|
|
|
import (
|
|
"github.com/ledgerwatch/turbo-geth/cmd/state/stateless"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var (
|
|
historyfile string
|
|
nocheck bool
|
|
writeReceipts bool
|
|
)
|
|
|
|
func init() {
|
|
withBlock(checkChangeSetsCmd)
|
|
withChaindata(checkChangeSetsCmd)
|
|
checkChangeSetsCmd.Flags().StringVar(&historyfile, "historyfile", "", "path to the file where the changesets and history are expected to be. If omitted, the same as --chaindata")
|
|
checkChangeSetsCmd.Flags().BoolVar(&nocheck, "nocheck", false, "set to turn off the changeset checking and only execute transaction (for performance testing)")
|
|
checkChangeSetsCmd.Flags().BoolVar(&writeReceipts, "writeReceipts", false, "set to turn off writing receipts as the exection ongoing")
|
|
rootCmd.AddCommand(checkChangeSetsCmd)
|
|
}
|
|
|
|
var checkChangeSetsCmd = &cobra.Command{
|
|
Use: "checkChangeSets",
|
|
Short: "Re-executes historical transactions in read-only mode and checks that their outputs match the database ChangeSets",
|
|
RunE: func(cmd *cobra.Command, args []string) error {
|
|
return stateless.CheckChangeSets(genesis, block, chaindata, historyfile, nocheck, writeReceipts)
|
|
},
|
|
}
|