the while loop in `suggest_node_channel_open()` of lnrater would not
break if there are no "good" peers available available. As a result the gui
blocks and electrum has to be killed. This can happen for example on
signet.
This removes the tested pk from the list of candidates so each candidate
gets tested only once.
- CURRENT_WALLET is set when a single wallet is loaded in memory, and it
remains set after Electrum stops running.
- If several wallets are loaded at the same time, CURRENT_WALLET is unset,
and RPCs must specify the wallet explicitly (using --wallet for the CLI)
- The fallback to 'default_wallet' essentially only applies when
creating a new wallet file
According to the asyncio documentation:
> When a task is cancelled, asyncio.CancelledError will be raised in the task at the next opportunity.
I guess the 'next opportunity' means the next await statement.
Here the issue is that the task was not awaiting ever.
Note: ElectrumX needs a similar patch
follow-up 7a7c0f1606
- before ref commit, we logged new headers for every interface
- after ref commit, we logged new header only for fastest interface
- now, we log new header for fastest interface and for main interface
- useful to see if main interface is very slow
This fixes a regression likely introduced with the docstring parameter parser.
The short description is the first period-separated sentence of the docstring.
Also remove the 'commands' command.
If the full tx is missing, we should force mempool/confirmed txs to be LOCAL height,
however future txs should not be forced to LOCAL, they should remain FUTURE.
follow-up 197933debf
get_tx_height previously did not consider whether the walletDB has the full tx for
the corresponding txid, and could consider a tx even "mined" and spv-ed, even if
we were missing the raw tx.
Now if the full tx is missing or the tx in the db is partial,
get_tx_height considers it to be LOCAL.
In particular the txbatcher, in `run_iteration`,
- first saves a tx as local *unsigned* (to reserve UTXOs),
- then signs it and tries to broadcast it.
The history tx will later transition to local and signed,
after we get back the broadcasted tx via the Synchronizer dance.
In the meantime there is a race where we have an unsigned tx in the history,
but the txid could already transition to mempool or even to mined,
before we download the full raw tx from the server.
During that time window, it makes the adb state more consistent
to just consider the history tx to be local, as done here.
This adds an additional layer of defense.
Potential attack:
- "English" gets added as a language on the crowdin project
- (this can only be done by a moderator or the crowdin devs)
- malicious strings get added on crowdin as English translations
- we don't notice and pull the updates into the locale git submodule
- users with the "default" lang option selected who have their OS lang set to English
- and users with "English" explicitly selected in Electrum
- would see the malicious strings