[#63] frostfs-adm: Fix contract wallet creation #70

Merged
dstepanov-yadro merged 1 commit from fix/do-not-create-wallet-in-set-config into master 2023-02-22 07:08:38 +00:00
2 changed files with 4 additions and 2 deletions
Showing only changes of commit 91008cf3ef - Show all commits

View file

@ -42,6 +42,7 @@ Changelog for FrostFS Node
- `neo-go` client deadlock on subscription restoration (#2244)
- Possible panic during write-cache initialization (#2234)
- Do not fetch an object if `meta` is missing it (#61)
- Create contract wallet only by `init` and `update-config` command (#63)
### Removed
### Updated

View file

@ -115,8 +115,10 @@ func newInitializeContext(cmd *cobra.Command, v *viper.Viper) (*initializeContex
return nil, err
}
needContracts := cmd.Name() == "update-contracts" || cmd.Name() == "init"
var w *wallet.Wallet
if cmd.Name() != "deploy" {
if needContracts {
w, err = openContractWallet(v, cmd, walletDir)
if err != nil {
return nil, err
@ -157,7 +159,6 @@ func newInitializeContext(cmd *cobra.Command, v *viper.Viper) (*initializeContex
}
}
needContracts := cmd.Name() == "update-contracts" || cmd.Name() == "init"
if needContracts {
ctrPath, err = cmd.Flags().GetString(contractsInitFlag)
if err != nil {