1
0
Commit Graph

13072 Commits

Author SHA1 Message Date
ThomasV
8e2320552f Merge pull request #6754 from nc50lc/master
Fix Import/Export contacts issue
2020-11-25 11:51:17 +01:00
ThomasV
43c5df2ab5 Setconfig: set rpc_user rpc_password in daemon (fix #6762).
Do not disable auth if password is an empty string.
2020-11-25 11:47:30 +01:00
SomberNight
7e18e2ea31 qt main_window: (trivial) fix error-handling for open_channel
fixes #6776
2020-11-25 10:03:49 +01:00
ThomasV
4ae2717ac7 lnworker: better indentation (refactoring only) 2020-11-25 09:16:40 +01:00
SomberNight
f0cca25303 wallet: fix dscancel for "not all inputs ismine" case
fixes #6693
2020-11-25 09:00:44 +01:00
ThomasV
1161ce919f Move get_channel_info and get_channel_policy code, so that routing
hints can be created without access to a ChannelDB instance.
2020-11-25 08:53:19 +01:00
SomberNight
4bd4fc7697 qt send tab: (regression) fix handling multiline fmt for single line
fixes #6761
2020-11-25 00:03:38 +01:00
SomberNight
01fe443928 lnrouter: nicer repr for PathEdge and RouteEdge 2020-11-24 23:44:09 +01:00
SomberNight
18066c72a0 lnaddr: fix decoding of min_final_cltv_expiry
Previously we failed to decode min_final_cltv_expiry properly if the highest bit was 1:
in practice, we could not pay invoices that had a value in [16-31] or [512-1023].
Many invoices use a value around 144, so this was simply unnoticed.

also update default value to follow BOLT change:
c5693d336d
2020-11-24 23:42:29 +01:00
ghost43
1bf8d2ea56 Merge pull request #6766 from benma/bb02
bitbox02: more robust account keypath
2020-11-24 20:42:22 +00:00
Jin Eguchi
eaacecf4a1 Fix get_running_loop (python<3.7) (#6765) 2020-11-24 20:39:30 +00:00
Benoît Verret
a1c02e2c45 Fix daemon being treated as a function (#6771)
daemon was improperly turned into a function in the Python console.
Point daemon to window.gui_object.daemon instead.
2020-11-24 20:24:44 +00:00
ThomasV
85bce256e7 Merge pull request #6758 from Emzy/patch-1
add mempool.emzy.de explorer
2020-11-23 15:08:36 +01:00
Marko Bencun
b78b077606 bitbox02: more robust account keypath
In multisig, we plan to allow other kinds of keypaths that are not
exactly 4 elements long. This change allows parsing the account
keypath for any kind of keypath, assuming the last two element are /change/address.
2020-11-23 14:32:04 +01:00
Stephan Oeste
a5acb7d695 add mempool.emzy.de
Same software as mempool.space other operator.
2020-11-22 01:43:47 +01:00
SomberNight
9fced6d2b1 qt send tab: "max" btn should not raise NotEnoughFunds due to fees
If a tx cannot be constructed due to current fee settings, try to
create one with zero miner fees instead and let user to change the
fee later.

fixes #6755
2020-11-21 19:35:27 +01:00
SomberNight
756d2eb004 mac build: call git describe after git submodule update
otherwise it could be that `git describe` will say "dirty" but the binary
will not actually be dirty as it just needed `git submodule update`
2020-11-21 19:29:29 +01:00
ThomasV
32ffc9e9a4 convert Qt flags to int (fix Qt DeprecationWarning) 2020-11-21 12:15:24 +01:00
nc50lc
33da994131 Update contact_list.py
Try to fix https://github.com/spesmilo/electrum/issues/6356
2020-11-21 12:30:57 +08:00
ThomasV
dfcdcb8d64 fix typo 2020-11-20 08:51:01 +01:00
ThomasV
0b183444b4 Rename maybe_init_lightning(). Call load_data() from there 2020-11-20 08:35:57 +01:00
SomberNight
13563697f5 exchange_rate: log full traceback in case of unexpected exception
related: #6748
2020-11-20 01:45:11 +01:00
SomberNight
57768244bb qt history list: fix #6746 2020-11-18 23:50:08 +01:00
SomberNight
6f105ae43b android build: bump targetSdkVersion to 29 (follow-up)
follow-up: 59e9337be0

For some reason, without this change, the first build works but subsequent builds fail.
Not sure what the cause is. This is why Travis builds work.
4.0.5
2020-11-18 20:22:13 +01:00
SomberNight
827f00896c update locale submodule 2020-11-18 20:19:38 +01:00
SomberNight
5c0430dced prepare release 4.0.5 2020-11-18 19:43:24 +01:00
SomberNight
16a326cdd3 qt receive tab: rename "create onchain" btn to "New Address" 2020-11-18 18:58:37 +01:00
SomberNight
3f04520d0f ledger: suppress traceback during device enumeration for locked device
ledger now gives an error if querying xpub while device is not (unlocked and in bitcoin app).
we do query the xpub however, to calc root fingerprint to be used as soft device id.

trace:

I | plugin.DeviceMgr | scanning devices...
D | util.profiler | DeviceMgr.scan_devices 3.4463
I | plugin.DeviceMgr | Registering <electrum.plugins.ledger.ledger.Ledger_Client object at 0x0000029DF6B08520>
E | gui.qt.installwizard.InstallWizard |
Traceback (most recent call last):
  File "...\electrum\electrum\plugins\ledger\ledger.py", line 225, in checkDevice
    self.perform_hw1_preflight()
  File "...\electrum\electrum\plugin.py", line 362, in wrapper
    return run_in_hwd_thread(partial(func, *args, **kwargs))
  File "...\electrum\electrum\plugin.py", line 352, in run_in_hwd_thread
    return func()
  File "...\electrum\electrum\plugins\ledger\ledger.py", line 219, in perform_hw1_preflight
    raise e
  File "...\electrum\electrum\plugins\ledger\ledger.py", line 179, in perform_hw1_preflight
    firmwareInfo = self.dongleObject.getFirmwareVersion()
  File "...\Python38\site-packages\btchip\btchip.py", line 563, in getFirmwareVersion
    response = self.dongle.exchange(bytearray(apdu))
  File "...\Python38\site-packages\btchip\btchipComm.py", line 127, in exchange
    raise BTChipException("Invalid status %04x" % sw, sw)
btchip.btchipException.BTChipException: Exception : Invalid status 6700

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "...\electrum\electrum\base_wizard.py", line 317, in _choose_hw_device
    device_infos = devmgr.unpaired_device_infos(None, plugin, devices=scanned_devices,
  File "...\electrum\electrum\plugin.py", line 612, in unpaired_device_infos
    soft_device_id=client.get_soft_device_id(),
  File "...\electrum\electrum\plugin.py", line 362, in wrapper
    return run_in_hwd_thread(partial(func, *args, **kwargs))
  File "...\electrum\electrum\plugin.py", line 355, in run_in_hwd_thread
    return fut.result()
  File "...\Python38\lib\concurrent\futures\_base.py", line 439, in result
    return self.__get_result()
  File "...\Python38\lib\concurrent\futures\_base.py", line 388, in __get_result
    raise self._exception
  File "...\Python38\lib\concurrent\futures\thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "...\electrum\electrum\plugins\ledger\ledger.py", line 91, in get_soft_device_id
    self._soft_device_id = self.request_root_fingerprint_from_device()
  File "...\electrum\electrum\plugin.py", line 362, in wrapper
    return run_in_hwd_thread(partial(func, *args, **kwargs))
  File "...\electrum\electrum\plugin.py", line 352, in run_in_hwd_thread
    return func()
  File "...\electrum\electrum\plugins\hw_wallet\plugin.py", line 259, in request_root_fingerprint_from_device
    child_of_root_xpub = self.get_xpub("m/0'", xtype='standard')
  File "...\electrum\electrum\plugin.py", line 362, in wrapper
    return run_in_hwd_thread(partial(func, *args, **kwargs))
  File "...\electrum\electrum\plugin.py", line 352, in run_in_hwd_thread
    return func()
  File "...\electrum\electrum\plugins\ledger\ledger.py", line 57, in catch_exception
    return func(self, *args, **kwargs)
  File "...\electrum\electrum\plugins\ledger\ledger.py", line 111, in get_xpub
    self.checkDevice()
  File "...\electrum\electrum\plugin.py", line 362, in wrapper
    return run_in_hwd_thread(partial(func, *args, **kwargs))
  File "...\electrum\electrum\plugin.py", line 352, in run_in_hwd_thread
    return func()
  File "...\electrum\electrum\plugins\ledger\ledger.py", line 228, in checkDevice
    raise UserFacingException(_("Device not in Bitcoin mode")) from e
electrum.util.UserFacingException: Device not in Bitcoin mode
W | gui.qt.installwizard.InstallWizard | error getting device infos for ledger: Device not in Bitcoin mode
2020-11-18 15:36:15 +01:00
SomberNight
b78cbcffd1 ledger: fix enumerating ledger devices with new bitcoin app (1.5.1)
see https://github.com/bitcoin-core/HWI/issues/402
2020-11-18 15:36:11 +01:00
ThomasV
aaff48720f Qt lightning invoice dialog: make payment_hash copiable 2020-11-18 11:47:47 +01:00
SomberNight
f3c1313a4f coldcard: avoid creating keystore with testnet/mainnet mixed up
fixes #6722
2020-11-18 00:47:20 +01:00
SomberNight
fa8c751abf qt swap dialog: fix disabling "OK" btn if NotEnoughFunds 2020-11-17 19:44:33 +01:00
ghost43
5f39a2f29c Merge pull request #6740 from bitromortac/lnrater-followup
lnrater: follow-up for save channel db attribute accesses
2020-11-17 16:05:18 +00:00
SomberNight
59e9337be0 android build: bump targetSdkVersion to 29
as Google Play now mandates that as minimum
2020-11-17 16:54:24 +01:00
bitromortac
96c9a483d0 lnrater: follow-up
Add comment on node score and return copies of channel db dicts.
2020-11-17 10:48:42 +01:00
SomberNight
ef744f164b logging: make sure file logging uses utf8 encoding
--- Logging error ---
Traceback (most recent call last):
  File "...\Python38\lib\logging\__init__.py", line 1084, in emit
    stream.write(msg + self.terminator)
  File "...\Python38\lib\encodings\cp1252.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u26a1' in position 80: character maps to <undefined>
Call stack:
  File ".../electrum/run_electrum", line 466, in <module>
    main()
  File ".../electrum/run_electrum", line 384, in main
    handle_cmd(
  File ".../electrum/run_electrum", line 402, in handle_cmd
    d.run_gui(config, plugins)
  File "...\electrum\electrum\daemon.py", line 572, in run_gui
    self.gui_object.main()
  File "...\electrum\electrum\gui\qt\__init__.py", line 391, in main
    self.app.exec_()
  File "...\electrum\electrum\gui\qt\channels_list.py", line 308, in new_channel_with_warning
    self.new_channel_dialog()
  File "...\electrum\electrum\gui\qt\channels_list.py", line 390, in new_channel_dialog
    if not d.exec_():
  File "...\electrum\electrum\gui\qt\channels_list.py", line 358, in on_suggest
    nodeid = bh2u(lnworker.lnrater.suggest_peer() or b'')
  File "...\electrum\electrum\lnrater.py", line 257, in suggest_peer
    return self.suggest_node_channel_open()[0]
  File "...\electrum\electrum\lnrater.py", line 248, in suggest_node_channel_open
    self.logger.info(
Message: 'node rating for Bottlepay:\nNodeStats(number_channels=20, total_capacity_msat=167455866000, median_capacity_msat=8460000000.0, mean_capacity_msat=8372793300.0, node_age_block_height=71003, mean_channel_age_block_height=48581.39999999991, blocks_since_last_channel=507, mean_fee_rate=1e-06) (score 0.5034595626052799)'
Arguments: ()
2020-11-16 14:50:22 +01:00
SomberNight
ec0f91942d daemon: fix local RPC server error messages to conform to jsonrpc spec
fixes #6672
2020-11-14 19:59:59 +01:00
SomberNight
a5c6a570ae qt console: fix usage in --offline mode
fixes #6731
related: #6467
2020-11-14 19:36:54 +01:00
SomberNight
8c1c07a290 build: partially revert 3cd52e2d7b
new versions of yarl and multidict break the windows build as they
don't provide win32 wheels

see
https://github.com/aio-libs/multidict/issues/550
https://github.com/aio-libs/yarl/issues/535
2020-11-14 09:07:46 +01:00
SomberNight
7ac968b406 mac build: use a virtualenv instead of global python packages
This helps to avoid older versions of pip-installed dependencies interfering with the build.
2020-11-14 06:58:56 +01:00
SomberNight
3cd52e2d7b rerun freeze_packages 2020-11-14 05:21:33 +01:00
SomberNight
168801b7f8 contrib/freeze_packages.sh: trivial clean-up 2020-11-14 05:18:12 +01:00
SomberNight
77f75f102b mac build: bundle old PyQt5 so that .app runs on macOS 11 "Big Sur"
This is the time of the year Apple breaks our mac builds, as usual.
mac now has its own "binaries" requirements. This allows us to use
an older version of PyQt5 in the mac binaries. For some reason
if we bundle newer PyQt5, the built app will not start on macOS 11
(but will on older macOS).

related: #6461
in particular, see https://github.com/spesmilo/electrum/issues/6461#issuecomment-713888921
2020-11-14 05:17:24 +01:00
SomberNight
a4e342ac58 requirements: rename some files 2020-11-14 04:30:48 +01:00
SomberNight
c872c3194f qt "open channel" dialog: detect invalid remote node id sooner
and avoid the "please wait" text to be interpreted as a node id

related #6705
2020-11-13 19:21:37 +01:00
SomberNight
46e59d18f5 invoices: rename "Pending" to "Unpaid"
related #6711
2020-11-13 19:18:34 +01:00
SomberNight
df6dc8fcf2 fix python 3.6 compat
fix #6725

follow-up #6705
2020-11-11 19:47:37 +01:00
ThomasV
ea654ad740 Merge pull request #6705 from bitromortac/lnrater
lightning: reintroduce node recommendation
2020-11-09 10:06:13 +01:00
SomberNight
120da2783b util.randrange: use stdlib 'secrets' module instead of 'python-ecdsa' 2020-11-07 19:26:30 +01:00
bitromortac
f36d7872c3 qt: move local node id to info menu 2020-11-06 08:00:24 +01:00