[#42] add ResolveContractHash method #111
Labels
No labels
P0
P1
P2
P3
good first issue
pool
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
5 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-sdk-go#111
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "pogpp/frostfs-sdk-go:feature/resolveContractHash"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Signed-off-by: Pavel Pogodaev p.pogodaev@yadro.com
06a3e52ac4
tobba50de5c2
Could you also fix the commit message? (
ns: Add...
)@ -119,0 +147,4 @@
}
strRecordValue := string(recordValue)
if err == nil {
Can it be false? We check the error 5 lines above.
@ -119,0 +120,4 @@
// ResolveContractHash looks up for NNS TXT records for the given container domain
// by calling `resolve` method of NNS contract. Returns the first record which represents
// valid container ID in a string format. Otherwise, returns an error.
It doesn't return
first record which represents valid container ID in a string format
@ -119,0 +125,4 @@
// ResolveContractHash MUST NOT be called before successful Dial.
//
// See also https://docs.neo.org/docs/en-us/reference/nns.html.
func (n *NNS) ResolveContractHash(domain container.Domain) (util.Uint160, error) {
I'm not sure if it's a good idea to use
container.Domain
when we resolve contract hash. Maybe it's too confusing and we should provide just string as argument. What do you think?String should be a valid domain, e.g.
container.frostfs
. I would rather movecontainer.Domain
structure from container package to some sort of shared package.bba50de5c2
tod5971e508c
8e7002a4df
tofd0f4c01d7
@ -119,0 +147,4 @@
}
strRecordValue := string(recordValue)
if err == nil {
You've already checked that
err != nil
above :)fd0f4c01d7
to9338e80628
9338e80628
to693da7f400
693da7f400
tob9afe7a2f9
ResolveContractHash
method #42