electrum-nmc icon indicating copy to clipboard operation
electrum-nmc copied to clipboard

sequenced name_updates fails

Open RyuMaster opened this issue 3 years ago • 3 comments

If I sent one name_update after another, electrum returns 500 error for the second one, only first name_update is being executed Both only works, if I have decent-enough delay between, like 3 seconds or more.

Is it something I need to configure additionally?

RyuMaster avatar Mar 28 '22 15:03 RyuMaster

Are you using the broadcast command by itself to send the transactions, or are you also using addtransaction? There is an undocumented race condition in upstream Electrum; the former will only result in your wallet learning about the transaction after the server reports it, which would explain your 3-second minimum. If that's the cause, let me know and I can look into documenting this upstream.

JeremyRand avatar Apr 18 '22 21:04 JeremyRand

We are using broadcast, so that explains it indeed. Thanks for pointing this out! If we change that to addtransaction, will that automatically broadcast, or do we need to do both of them?

domob1812 avatar Apr 19 '22 04:04 domob1812

You need to do both; see the implementation of the name_autoregister command for an example. Thanks for confirming this is the cause; I'll check with upstream about documenting this better. (I'll leave this issue open until the documentation is fixed.)

JeremyRand avatar Apr 19 '22 06:04 JeremyRand