-
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
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 |
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.
tests/deploys.go
Outdated
} | ||
|
||
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) { |
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.
So do I, but I have nothing to suggest as a ContractStateGetter
for InferHash func.
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.
nns.ID is still relevant here.
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.
nothing to suggest as a ContractStateGetter for InferHash func
wasnt e.Chain
good enough?
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.
Unfortunately no, neotest Chain is not good enough
5d37c3c
to
ca59b54
Compare
tests/deploys.go
Outdated
} | ||
|
||
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.
nns.ID is still relevant here.
ca59b54
to
9f1b67a
Compare
Signed-off-by: Evgenii Baidakov <[email protected]>
9f1b67a
to
2f07ada
Compare
No description provided.