Closed gits7r closed 4 years ago
Hmm, I suspect this is (in some cases) a feature rather than a bug. If we prevented registering a name just because there was an unconfirmed registration of this name, then a malicious server could prevent users from registering a name just by returning an unverified transaction for it.
We could, I suppose, search the local wallet for transactions that were created locally rather than retrieved from a server, but I don't think Electrum stores this metadata right now. The name_firstupdate
transaction queue happens to be only writable locally (network activity won't result in transactions being added to it), so as a temporary workaround we could check that set of transactions.
Yea, the only way is to local check and see if we have a Pre-registration fee for that name.
Yes, seems reasonable to search the queued transaction list. This won't work for all cases, but it's an easy heuristic that will work a lot of the time.
Also, even after it is registered (name_firstupdate
was sent), for some like 20 blocks more the domain name still is reported as available to register. I think there is a bug here as well.
So you send a name_new
, and wait for 12 blocks. During this time, the same wallet reports this domain name as available to register - this is the bug we will fix in this issue by looking at the local transactions list.
After 12 blocks, you send name_firstupdate
and the name becomes available under Manage Names tab. At this moment, for few more hours at least, the same domain name is still being reported as available to register under the Buy names tab.
If you try to register a domain name, while it is pending, when you go to Buy names and try to search for it, it reports it as available to register. It should detect that we already registered it, and it is pending.