add chain support to (#2176)

This commit is contained in:
Alex Sharov 2021-06-16 11:31:25 +07:00 committed by GitHub
parent dcf850dd75
commit 372ab9060a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 3 deletions

View File

@ -55,10 +55,12 @@ var cmdClearUnwindStack = &cobra.Command{
func init() {
withDatadir(cmdResetState)
withChain(cmdResetState)
rootCmd.AddCommand(cmdResetState)
withDatadir(cmdClearUnwindStack)
withChain(cmdClearUnwindStack)
rootCmd.AddCommand(cmdClearUnwindStack)
}

View File

@ -24,6 +24,7 @@ func init() {
withDatadir(cmdSnapshotCheck)
withBlock(cmdSnapshotCheck)
withBatchSize(cmdSnapshotCheck)
withChain(cmdSnapshotCheck)
cmdSnapshotCheck.Flags().StringVar(&tmpDBPath, "tmp_db", "", "path to temporary db(for debug)")
}

View File

@ -245,18 +245,20 @@ var cmdSetStorageMode = &cobra.Command{
func init() {
withDatadir(cmdPrintStages)
withChain(cmdPrintStages)
rootCmd.AddCommand(cmdPrintStages)
//withChaindata(cmdStageSenders)
withReset(cmdStageSenders)
withBlock(cmdStageSenders)
withUnwind(cmdStageSenders)
withDatadir(cmdStageSenders)
withChain(cmdStageSenders)
rootCmd.AddCommand(cmdStageSenders)
withDatadir(cmdStageBodies)
withUnwind(cmdStageBodies)
withChain(cmdStageBodies)
rootCmd.AddCommand(cmdStageBodies)
@ -292,6 +294,7 @@ func init() {
withReset(cmdStageHistory)
withBlock(cmdStageHistory)
withUnwind(cmdStageHistory)
withChain(cmdStageHistory)
rootCmd.AddCommand(cmdStageHistory)
@ -299,6 +302,7 @@ func init() {
withReset(cmdLogIndex)
withBlock(cmdLogIndex)
withUnwind(cmdLogIndex)
withChain(cmdLogIndex)
rootCmd.AddCommand(cmdLogIndex)
@ -306,6 +310,7 @@ func init() {
withReset(cmdCallTraces)
withBlock(cmdCallTraces)
withUnwind(cmdCallTraces)
withChain(cmdCallTraces)
rootCmd.AddCommand(cmdCallTraces)
@ -313,6 +318,7 @@ func init() {
withBlock(cmdStageTxLookup)
withUnwind(cmdStageTxLookup)
withDatadir(cmdStageTxLookup)
withChain(cmdStageTxLookup)
rootCmd.AddCommand(cmdStageTxLookup)
@ -321,12 +327,15 @@ func init() {
withDatadir(cmdRemoveMigration)
withMigration(cmdRemoveMigration)
withChain(cmdRemoveMigration)
rootCmd.AddCommand(cmdRemoveMigration)
withDatadir(cmdRunMigrations)
withChain(cmdRunMigrations)
rootCmd.AddCommand(cmdRunMigrations)
withDatadir(cmdSetStorageMode)
withChain(cmdSetStorageMode)
cmdSetStorageMode.Flags().StringVar(&storageMode, "storage-mode", "htre", "Storage mode to override database")
rootCmd.AddCommand(cmdSetStorageMode)
}

View File

@ -111,27 +111,28 @@ var loopExecCmd = &cobra.Command{
}
func init() {
//withChaindata(stateStags)
withDatadir2(stateStags)
withReferenceChaindata(stateStags)
withUnwind(stateStags)
withUnwindEvery(stateStags)
withBlock(stateStags)
//withBatchSize(stateStags)
withIntegrityChecks(stateStags)
withMining(stateStags)
withChain(stateStags)
rootCmd.AddCommand(stateStags)
withDatadir(loopIhCmd)
withBatchSize(loopIhCmd)
withUnwind(loopIhCmd)
withChain(loopIhCmd)
rootCmd.AddCommand(loopIhCmd)
withDatadir(loopExecCmd)
withBatchSize(loopExecCmd)
withUnwind(loopExecCmd)
withChain(loopExecCmd)
rootCmd.AddCommand(loopExecCmd)
}