Skip to content

Commit

Permalink
Merge pull request #4700 from oasisprotocol/ptrus/feature/unsafe-rese…
Browse files Browse the repository at this point in the history
…t-default

go/oasis-node/cmd: unsafe-reset perserve local storage by default
  • Loading branch information
ptrus authored Apr 26, 2022
2 parents fc7215b + 55d6d33 commit e1d8665
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .changelog/4700.feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
go/oasis-node/cmd: unsafe-reset preserve local storage by default
2 changes: 1 addition & 1 deletion go/oasis-node/cmd/node/unsafe_reset.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func doUnsafeReset(cmd *cobra.Command, args []string) {
}

func init() {
unsafeResetFlags.Bool(CfgPreserveLocalStorage, false, "preserve per-runtime untrusted local storage")
unsafeResetFlags.Bool(CfgPreserveLocalStorage, true, "preserve per-runtime untrusted local storage")
unsafeResetFlags.Bool(CfgPreserveMKVSDatabase, true, "preserve per-runtime MKVS database")
_ = viper.BindPFlags(unsafeResetFlags)
}
4 changes: 2 additions & 2 deletions go/oasis-test-runner/oasis/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ func (h *Helpers) UnsafeReset(dataDir string, preserveRuntimeStorage, preserveLo
if !preserveRuntimeStorage {
args = append(args, "--"+cmdNode.CfgPreserveMKVSDatabase+"=false")
}
if preserveLocalStorage {
args = append(args, "--"+cmdNode.CfgPreserveLocalStorage)
if !preserveLocalStorage {
args = append(args, "--"+cmdNode.CfgPreserveLocalStorage+"=false")
}
return h.runSubCommand("unsafe-reset", args)
}
Expand Down

0 comments on commit e1d8665

Please sign in to comment.