[#2079] cli: Do not panic in object hash
Sign RPC requests with the provided key. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
960a2d0629
commit
761e82fecd
2 changed files with 3 additions and 2 deletions
|
@ -42,6 +42,7 @@ Changelog for NeoFS Node
|
|||
- Ignore error if a transaction already exists in a morph client (#2075)
|
||||
- ObjectID signature output in the CLI (#2104)
|
||||
- Pack arguments of `setPrice` invocation during contract update (#2078)
|
||||
- `neofs-cli object hash` panic (#2079)
|
||||
|
||||
### Removed
|
||||
- `-g` option from `neofs-cli control ...` and `neofs-cli container create` commands (#2089)
|
||||
|
|
|
@ -64,11 +64,13 @@ func getObjectHash(cmd *cobra.Command, _ []string) {
|
|||
common.ExitOnErr(cmd, "could not decode salt: %w", err)
|
||||
|
||||
pk := key.GetOrGenerate(cmd)
|
||||
cli := internalclient.GetSDKClientByFlag(cmd, pk, commonflags.RPC)
|
||||
|
||||
tz := typ == hashTz
|
||||
fullHash := len(ranges) == 0
|
||||
if fullHash {
|
||||
var headPrm internalclient.HeadObjectPrm
|
||||
headPrm.SetClient(cli)
|
||||
Prepare(cmd, &headPrm)
|
||||
headPrm.SetAddress(objAddr)
|
||||
|
||||
|
@ -94,8 +96,6 @@ func getObjectHash(cmd *cobra.Command, _ []string) {
|
|||
return
|
||||
}
|
||||
|
||||
cli := internalclient.GetSDKClientByFlag(cmd, pk, commonflags.RPC)
|
||||
|
||||
var hashPrm internalclient.HashPayloadRangesPrm
|
||||
hashPrm.SetClient(cli)
|
||||
Prepare(cmd, &hashPrm)
|
||||
|
|
Loading…
Reference in a new issue