[#888] neofs-adm: allow to work with multiple NNS versions
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
6571f9214f
commit
31b3c71457
2 changed files with 17 additions and 10 deletions
|
@ -78,9 +78,8 @@ func dumpContractHashes(cmd *cobra.Command, _ []string) error {
|
|||
|
||||
for i := 0; i < irSize; i++ {
|
||||
ctrHash := "hash is invalid"
|
||||
bs, err := alphaRes.Stack[i].TryBytes()
|
||||
if err == nil {
|
||||
ctrHash = string(bs) // hashes are stored as hex-encoded LE string
|
||||
if h, err := parseNNSResolveResult(alphaRes.Stack[i]); err == nil {
|
||||
ctrHash = h.StringLE()
|
||||
}
|
||||
|
||||
_, _ = tw.Write([]byte(fmt.Sprintf("alphabet %d:\t%s\n", i, ctrHash)))
|
||||
|
@ -89,9 +88,8 @@ func dumpContractHashes(cmd *cobra.Command, _ []string) error {
|
|||
|
||||
for i := range contractList {
|
||||
ctrHash := "hash is invalid"
|
||||
bs, err := res.Stack[i].TryBytes()
|
||||
if err == nil {
|
||||
ctrHash = string(bs) // hashes are stored as hex-encoded LE string
|
||||
if h, err := parseNNSResolveResult(res.Stack[i]); err == nil {
|
||||
ctrHash = h.StringLE()
|
||||
}
|
||||
|
||||
_, _ = tw.Write([]byte(fmt.Sprintf("%s:\t%s\n", contractList[i], ctrHash)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue