-
Notifications
You must be signed in to change notification settings - Fork 17
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
Add some helpers functions for testing purposes. #435
base: master
Are you sure you want to change the base?
Conversation
e016227
to
ded2737
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
helpers should be tested themselves, especially with current implementation
ded2737
to
06dedf0
Compare
I added tests |
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
06dedf0
to
5d37c3c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, isn't most of the code can (should) be reused from rpc/nns
package? It seems like it was made for it but mb I don't know some interfaces mismatch.
nnsInv := e.CommitteeInvoker(nnsHash) | ||
|
||
nnsInv.Invoke(t, true, "register", params.Name+".neofs", e.CommitteeHash, params.Email, params.Refresh, params.Retry, params.Email, params.TTL) | ||
nnsInv.Invoke(t, nil, "addRecord", params.Name+".neofs", 16, params.ContractHash.StringLE()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we use
TXT Type = 16 |
} | ||
|
||
func nnsContractInvoker(t *testing.T, e *neotest.Executor) *neotest.ContractInvoker { | ||
nnsHash, err := e.Chain.GetContractScriptHash(1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think @roman-khimov prefers
neofs-contract/rpc/nns/hashes.go
Line 34 in db6dbb9
func InferHash(sg ContractStateGetter) (util.Uint160, error) { |
No description provided.