-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Neo Name Service #2201
Neo Name Service #2201
Conversation
Ready for review. |
uint now = (uint)(engine.Snapshot.PersistingBlock.Timestamp / 1000) + 1; | ||
byte[] start = CreateStorageKey(Prefix_Expiration).AddBigEndian(0).ToArray(); | ||
byte[] end = CreateStorageKey(Prefix_Expiration).AddBigEndian(now).ToArray(); | ||
foreach (var (key, _) in engine.Snapshot.Storages.FindRange(start, end)) |
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.
Maybe it is possible to just delete those expired within the last couple of seconds.
The start can be the last end.
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.
There is no difference when doing db search.
if (!IPAddress.TryParse(data, out IPAddress address)) throw new FormatException(); | ||
if (address.AddressFamily != AddressFamily.InterNetwork) throw new FormatException(); | ||
break; | ||
case RecordType.CNAME: |
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.
It is better to check whether the original domain name exists.
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.
But the original name can be external.
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.
what do you mean?
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.
An external name, for example, google.com
.
Tested PASS with following scenaroes:
|
@cloud8little The cases can be added to UT. |
Sure, @erikzhang what do you think of following two questions?
Thought providing contract method or RPC API is both OK. because the owner of the domain can transfer the domain to the other account, and the new account may have no idea who is the admin. |
|
1 is ok to me. |
Please check #2222 |
…nEngine running again
Close #1545
Replace #1644