When replacing non-segwit tx, bump_fee in some circumstances created
a tx that tried to spend from the tx-to-be-replaced. There is
explicit logic to avoid this but it only worked for segwit txs.
The change in transaction.py is a no-op, just tried to make it clearer
that the scriptSigs, witnesses are being reset by from_tx().
The 'height' field was added in cdfaaa2609
At the time we thought we could just add it with a default value without a db upgrade;
however the issue is that if old code tries to open a new db, it will fail (due to unexpected new field).
Hence it is better to do an explicit conversion where old code *knows* it cannot open the new db.
E | gui.qt.ElectrumGui |
Traceback (most recent call last):
File "...\electrum\electrum\gui\qt\__init__.py", line 257, in start_new_window
wallet = self.daemon.load_wallet(path, None)
File "...\electrum\electrum\daemon.py", line 488, in load_wallet
db = WalletDB(storage.read(), manual_upgrades=manual_upgrades)
File "...\electrum\electrum\wallet_db.py", line 72, in __init__
self.load_data(raw)
File "...\electrum\electrum\wallet_db.py", line 103, in load_data
self._after_upgrade_tasks()
File "...\electrum\electrum\wallet_db.py", line 189, in _after_upgrade_tasks
self._load_transactions()
File "...\electrum\electrum\util.py", line 408, in <lambda>
return lambda *args, **kw_args: do_profile(args, kw_args)
File "...\electrum\electrum\util.py", line 404, in do_profile
o = func(*args, **kw_args)
File "...\electrum\electrum\wallet_db.py", line 1139, in _load_transactions
self.data = StoredDict(self.data, self, [])
File "...\electrum\electrum\json_db.py", line 79, in __init__
self.__setitem__(k, v)
File "...\electrum\electrum\json_db.py", line 44, in wrapper
return func(self, *args, **kwargs)
File "...\electrum\electrum\json_db.py", line 105, in __setitem__
v = self.db._convert_dict(self.path, key, v)
File "...\electrum\electrum\wallet_db.py", line 1182, in _convert_dict
v = dict((k, Invoice.from_json(x)) for k, x in v.items())
File "...\electrum\electrum\wallet_db.py", line 1182, in <genexpr>
v = dict((k, Invoice.from_json(x)) for k, x in v.items())
File "...\electrum\electrum\invoices.py", line 108, in from_json
return OnchainInvoice(**x)
TypeError: __init__() got an unexpected keyword argument 'height'
In a normal (forward) swap (onchain->offchain):
send_amount = receive_amount * (1 + service_percentage) + normal_fee ,
and vice versa:
receive_amount = (send_amount + normal_fee) / (1 + service_percentage) ,
i.e., the service fee is charged on the received offchain amount.
as discussed in issue #6697, users with large wallets or slow
connections may never see their initial request-missing-tx run complete,
if we always use the same sync order.
This commit shuffles the addresses being requested every time a new
request round happens, so that (if enough time passes and enough initial
state requests are attempted) we will always get the latest state for
each address, regardless of how quickly the connection times out on us
The GUI blocks until network.set_parameters returns when switching servers,
which waits for switch_to_interface, which used to wait until interface.close()
returns. interface.close() tries to flush buffered writes to the wire, with a
30 sec timeout.
If the server or the network connection is slow, flushing the buffer can take
several seconds. In particular, servers running Fulcrum always seem to
timeout in this case, freezing the GUI for 30 seconds (when switching away).
- set -e, and don't call deactivate (not needed; and with -e
if ./run_electrum errors it wouldn't run anyway)
- re PYTHONPATH
- I think the sane thing is to give priority to the virtualenv,
and only use system-packages as a fallback
- added more paths; tested that it now works for modern Ubuntu
and Manjaro
- use "python3 -m venv" instead of "virtualenv"
(as former is always(?) available now)
There are three export options for exporting a PSBT.
The default option previously only put derivation path suffixes for pubkeys
(paths relative to the intermediate xpub), now it puts the full path
(if is known by the keystore).
The "export for hardware device; include xpubs" option works same as before:
it puts both full paths and also global xpubs into the PSBT.
Hence the difference between the default option and the "include xpubs" option
is now only that the latter puts global xpubs into the PSBT.
This change is largely made for user-convenient in mind.
Now exporting a PSBT should be less error-prone: particularly for the
single-signer coldcard with sdcard usage, the default option will now work.
closes#5969
related #5955
Seeds in the set difference could already not be restored: they raised
an exception in the wizard; now these are not recognised as valid seeds
anymore (so e.g. OK button in wizard will be disabled).
Also see comments in code.
When running kivy on Linux desktop,
running from git clone, `./run_electrum -g kivy` worked,
but `pip install -e .; electrum -g kivy` did not.
This was due to the relative paths using cwd as base.
see #6835