[#63] adm: Fix contract wallet creation

Create contract wallet only by init and update-config command.

Close #63

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2023-02-21 16:17:41 +03:00 committed by fyrchik
parent cb5468abb8
commit 7eaf159a8b
2 changed files with 4 additions and 2 deletions

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 {