Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify custom signer scope for morph invocations #1124

Merged
merged 5 commits into from
Feb 11, 2022

Conversation

fyrchik
Copy link
Contributor

@fyrchik fyrchik commented Jan 29, 2022

Related #749 .

@codecov
Copy link

codecov bot commented Jan 29, 2022

Codecov Report

Merging #1124 (582ab01) into master (0695ec4) will decrease coverage by 0.08%.
The diff coverage is 9.09%.

❗ Current head 582ab01 differs from pull request most recent head 1ba1c2b. Consider uploading reports for the commit 1ba1c2b to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1124      +/-   ##
==========================================
- Coverage   35.56%   35.48%   -0.09%     
==========================================
  Files         285      285              
  Lines       17936    17971      +35     
==========================================
- Hits         6379     6377       -2     
- Misses      11074    11112      +38     
+ Partials      483      482       -1     
Impacted Files Coverage Δ
cmd/neofs-adm/internal/modules/morph/initialize.go 0.00% <0.00%> (ø)
...fs-adm/internal/modules/morph/initialize_deploy.go 0.00% <0.00%> (ø)
...neofs-adm/internal/modules/morph/initialize_nns.go 0.00% <0.00%> (ø)
cmd/neofs-adm/internal/modules/morph/subnet.go 15.86% <0.00%> (-0.04%) ⬇️
pkg/morph/client/client.go 6.93% <ø> (ø)
pkg/morph/client/nns.go 0.00% <0.00%> (ø)
pkg/morph/client/static.go 0.00% <ø> (ø)
cmd/neofs-adm/internal/modules/morph/group.go 20.00% <50.00%> (-0.59%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0695ec4...1ba1c2b. Read the comment docs.

"github.com/spf13/viper"
)

const contractWalletName = "contract.json"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be more clear I'd name it

Suggested change
const contractWalletName = "contract.json"
const contractWalletFilename = "contract.json"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

}

var password string
if key := "credentials.contract"; viper.IsSet(key) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems similar to code block in initializeManifestWallet, maybe unify them?
Btw key can be const.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
Copy link
Contributor

@alexvanin alexvanin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried on neofs-contract v0.14.2 with group.neofs NNS record and on v0.14.0 without NNS record. With requested fix works fine.

pkg/morph/client/nns.go Show resolved Hide resolved
pkg/morph/client/nns.go Show resolved Hide resolved
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
…function

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants