1
0
Commit Graph

13488 Commits

Author SHA1 Message Date
ThomasV
6620974f3d follow-up 652d10aa5f 2021-03-10 15:26:39 +01:00
SomberNight
0e01db4cee kivy: fix GridLayout orientations all over
Pre kivy 2.0, "orientation" was undefined for GridLayouts, not sure why we were setting it, it was a no-op.
kivy 2.0 added meaning to the field, and the values we were setting it to are invalid.

related:
https://github.com/kivy/kivy/pull/6741
https://github.com/kivy/kivy/issues/7142

-----

traceback:

E | gui.kivy.uix.dialogs.crash_reporter.ExceptionHook | exception caught by crash reporter
Traceback (most recent call last):
  File "/home/user/.local/lib/python3.8/site-packages/kivy/lang/builder.py", line 705, in _apply_rule
    setattr(widget_set, key, value)
  File "kivy/weakproxy.pyx", line 35, in kivy.weakproxy.WeakProxy.__setattr__
  File "kivy/properties.pyx", line 498, in kivy.properties.Property.__set__
  File "kivy/properties.pyx", line 542, in kivy.properties.Property.set
  File "kivy/properties.pyx", line 533, in kivy.properties.Property.set
  File "kivy/properties.pyx", line 1253, in kivy.properties.OptionProperty.check
ValueError: GridLayout.orientation is set to an invalid option 'vertical'. Must be one of: ['lr-tb', 'tb-lr', 'rl-tb', 'tb-rl', 'lr-bt', 'bt-lr', 'rl-bt', 'bt-rl']

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "kivy/_clock.pyx", line 645, in kivy._clock.CyClockBase._process_events
  File "kivy/_clock.pyx", line 218, in kivy._clock.ClockEvent.tick
  File "/home/user/wspace/electrum/electrum/gui/kivy/uix/ui_screens/receive.kv", line 141, in <lambda>
    on_release: Clock.schedule_once(lambda dt: s.expiration_dialog(s))
  File "/home/user/wspace/electrum/electrum/gui/kivy/uix/screens.py", line 517, in expiration_dialog
    d = ChoiceDialog(_('Expiration date'), pr_expiration_values, self.expiry(), callback)
  File "/home/user/wspace/electrum/electrum/gui/kivy/uix/dialogs/choice_dialog.py", line 53, in __init__
    Factory.Popup.__init__(self)
  File "/home/user/.local/lib/python3.8/site-packages/kivy/uix/modalview.py", line 187, in __init__
    super(ModalView, self).__init__(**kwargs)
  File "/home/user/.local/lib/python3.8/site-packages/kivy/uix/anchorlayout.py", line 68, in __init__
    super(AnchorLayout, self).__init__(**kwargs)
  File "/home/user/.local/lib/python3.8/site-packages/kivy/uix/layout.py", line 76, in __init__
    super(Layout, self).__init__(**kwargs)
  File "/home/user/.local/lib/python3.8/site-packages/kivy/uix/widget.py", line 359, in __init__
    self.apply_class_lang_rules(
  File "/home/user/.local/lib/python3.8/site-packages/kivy/uix/widget.py", line 463, in apply_class_lang_rules
    Builder.apply(
  File "/home/user/.local/lib/python3.8/site-packages/kivy/lang/builder.py", line 541, in apply
    self._apply_rule(
  File "/home/user/.local/lib/python3.8/site-packages/kivy/lang/builder.py", line 710, in _apply_rule
    raise BuilderException(rule.ctx, rule.line,
kivy.lang.builder.BuilderException: Parser: File "<inline>", line 21:
...
     19:            GridLayout:
     20:                row_default_height: '48dp'
>>   21:                orientation: 'vertical'
     22:                id: choices
     23:                cols: 2
...
ValueError: GridLayout.orientation is set to an invalid option 'vertical'. Must be one of: ['lr-tb', 'tb-lr', 'rl-tb', 'tb-rl', 'lr-bt', 'bt-lr', 'rl-bt', 'bt-rl']
  File "/home/user/.local/lib/python3.8/site-packages/kivy/lang/builder.py", line 705, in _apply_rule
    setattr(widget_set, key, value)
  File "kivy/weakproxy.pyx", line 35, in kivy.weakproxy.WeakProxy.__setattr__
  File "kivy/properties.pyx", line 498, in kivy.properties.Property.__set__
  File "kivy/properties.pyx", line 542, in kivy.properties.Property.set
  File "kivy/properties.pyx", line 533, in kivy.properties.Property.set
  File "kivy/properties.pyx", line 1253, in kivy.properties.OptionProperty.check
2021-03-10 14:59:47 +01:00
ThomasV
7ae82c8230 Revert "lnworker: simplify request_force_close_from_backup"
This reverts commit ce88b36e81.
2021-03-10 12:54:00 +01:00
gruve-p
abc155b688 Appimage build: update git=1:2.7.4-0ubuntu1.10 15b5d9d (#7091) 2021-03-09 23:35:02 +00:00
SomberNight
8de52bf523 wallet: (trivial) use kwargs for get_tx_item_fiat 2021-03-09 18:22:30 +01:00
SomberNight
3c019c2f9c daemon/wallet/network: make stop() methods async 2021-03-09 17:52:36 +01:00
ThomasV
ce88b36e81 lnworker: simplify request_force_close_from_backup 2021-03-09 12:28:25 +01:00
ThomasV
652d10aa5f Remove LNBackups object: no longer needed since LNWorker is instantiated by default. 2021-03-09 11:52:04 +01:00
ThomasV
ef661050c8 lnworker: set request status after LN payment 2021-03-09 09:35:43 +01:00
SomberNight
a125cd5392 tests: test payreq status after getting paid via LN
The test failures corresponding to single-part (non-MPP) payments expose a bug.

see 196b4c00a3/electrum/lnpeer.py (L1538-L1539)
`lnworker.add_received_htlc` is not called for single-part payments...
2021-03-08 22:18:06 +01:00
SomberNight
f662859e5c test_lnpeer: (trivial) prepare_invoice to return both LnAddr and str 2021-03-08 21:46:56 +01:00
SomberNight
4069b455d0 lnaddr: add get_features method 2021-03-08 21:36:27 +01:00
ThomasV
196b4c00a3 Use new value of option_trampoline_routing flag, add it to our invoices.
Keep supporting old value for Eclair/Phoenix.
Do not add trampoline_routing_hints in invoices.
2021-03-08 19:16:48 +01:00
SomberNight
0491da2c66 lnpeer: (trivial) log htlc in on_update_add_htlc 2021-03-08 18:51:52 +01:00
ThomasV
fd48b96335 follow-up prev commit 2021-03-08 17:45:00 +01:00
ThomasV
308b02ca7d lnworker: fix amount in htlc_log after mpp bucket failure 2021-03-08 17:23:52 +01:00
ThomasV
5df4466812 rm fixme; it was for intermediate stage, between commits. 2021-03-08 13:30:59 +01:00
SomberNight
cf5bf5d1af windows build: skip building pyinstaller if already there 2021-03-08 03:03:31 +01:00
SomberNight
41233a4bc7 windows build: minor clean-up 2021-03-07 22:58:44 +01:00
SomberNight
dded25f398 windows build: cache pip downloads 2021-03-07 22:12:26 +01:00
SomberNight
f1f584c4c4 windows build: separate 32/64 bit build caches
specify which architecture to target by setting WIN_ARCH env var
2021-03-07 20:02:38 +01:00
SomberNight
e07f615bbb windows binaries: update pyinstaller to 4.2 2021-03-07 20:02:35 +01:00
SomberNight
7698ab4ccb android build: update kivy, and python 2021-03-06 14:42:01 +01:00
SomberNight
edb214aeca lnworker.pay_to_node: re overpayment, raise before actually it happens 2021-03-06 14:23:00 +01:00
ThomasV
6ddd02506e test_lnpeer: add missing parameter in pay_to_route 2021-03-06 10:59:29 +01:00
ThomasV
83993768e5 trampoline: do not add node in trampoline hints if it already is
the last trampoline of the route
2021-03-06 10:46:58 +01:00
ThomasV
5663e59863 lnworker: fix amount_inflight.
(amount with routing fees were used on htlc failures)
2021-03-06 10:46:40 +01:00
ThomasV
d3d476f44c lnpeer: fix error code in logs 2021-03-06 00:31:30 +01:00
ThomasV
31919d0425 lnworker: add assert amount_inflight <= amount_to_pay 2021-03-06 00:29:37 +01:00
SomberNight
529e96aaf9 synchronizer: (trivial) add comment 2021-03-05 21:04:20 +01:00
SomberNight
1dbff51fce synchronizer: fix rare race where synchronizer could get stuck 2021-03-05 20:46:41 +01:00
SomberNight
34413a9c30 python 3.6 compat: asyncio.Task.set_name was added in 3.8 2021-03-05 20:11:54 +01:00
ThomasV
5207c40cc3 fix trampoline forwarding: add_received_htlc must be indexed by payment_secret 2021-03-05 17:04:26 +01:00
ThomasV
59547d0513 test_lnpeer: variables must be declared in MockLNWallet.__init__ 2021-03-05 17:04:26 +01:00
SomberNight
762ebb12b2 lnpeer: increase max_accepted_htlcs (5->30)
Counter-intuitively, the motivation is to be able to *send* more htlcs,
for MPP trickery. We don't offer more htlcs than this limit, to be
conservative with what we send, and to interoperate with clightning.

defaults of other clients:
eclair: 30
clightning: 30
lnd: 483
2021-03-05 16:12:01 +01:00
ThomasV
f397b315ac remove trampoline and forwarding regtests, as they are covered by unittests 2021-03-05 13:18:44 +01:00
ThomasV
1f60d5d8ee test_lnpeer: add test for trampoline 2021-03-05 13:00:24 +01:00
ThomasV
eda9097e89 trampoline forwarding: return UNKNOWN_NEXT_PEER if we cannot find a route 2021-03-05 12:47:18 +01:00
ThomasV
6cc3480356 follow-up prev commit 2021-03-05 10:23:00 +01:00
ThomasV
16554afa1b follow-up previous commit (this was for testing) 2021-03-05 10:14:26 +01:00
ThomasV
2e4f45ec74 use two trampolines: fix blacklisting, use local variables for trampoline_fee_level and use_two_trampolines 2021-03-05 10:07:02 +01:00
SomberNight
ec6baa12f8 follow-up prev
oops, that was just for local testing
2021-03-04 17:50:52 +01:00
SomberNight
064670bd75 network: close interfaces more aggressively (abort after 2 seconds)
fixes #7083
2021-03-04 17:47:49 +01:00
SomberNight
ff485cee62 use functools.wraps() for some wrappers
to help debugging
2021-03-04 16:44:13 +01:00
SomberNight
859f8ccf8e fix wallet.clear_history()
it would result in "wallet.get_history() failed balance sanity-check"

maybe related: https://github.com/spesmilo/electrum/issues/6792
2021-03-04 14:25:41 +01:00
ThomasV
5a2a724cb9 Receive MPP: Use persisted payment status to decide whether to
fulfill HTLCs. Without this commit, we might timeout a part of
a payment if the client is shut down before all parts are
fulfilled.
2021-03-04 14:11:55 +01:00
SomberNight
e25602ab3b wallet: don't put partial tx as UTXO into psbt
if there is a chain of unsigned txs, we cannot populate NON_WITNESS_UTXO

closes #7080
closes #7009
closes #6482
2021-03-04 13:20:49 +01:00
SomberNight
785fe6aeea lnutil: (trivial) add ShortChannelID.from_str() method
for console use atm
2021-03-04 12:14:47 +01:00
ThomasV
738411e32b Trampoline forwarding:
- fix regression in create_routes:
   fwd_trampoline_onion was not added to the tuple
 - fix onion structure for e2e
 - maybe_fulfill_htlc:
   check the mpp_status of the outer onion,
   return trampoline_onion to be forwarded
2021-03-04 11:46:31 +01:00
ThomasV
ba4d6bc8b3 trampoline MPP: fix total_msat in trampoline onion, and bucketing 2021-03-04 10:05:09 +01:00