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.
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.
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.
It is better to check whether the original domain name exists.
There was a problem hiding this comment.
But the original name can be external.
There was a problem hiding this comment.
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