• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

spesmilo / electrum / 5332878263844864
63%

Build:
DEFAULT BRANCH: master
Ran 10 Jul 2023 06:42PM UTC
Jobs 6
Files 78
Run time 2s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
5332878263844864

push

CirrusCI

SomberNight
qt: kind of fix bip70 notify_merchant logic by passing around PI

```
229.18 | E | gui.qt.main_window.[test_segwit_2] | on_error
Traceback (most recent call last):
  File "...\electrum\gui\qt\util.py", line 917, in run
    result = task.task()
  File "...\electrum\gui\qt\send_tab.py", line 681, in broadcast_thread
    if self.payto_e.payment_identifier.has_expired():
AttributeError: 'NoneType' object has no attribute 'has_expired'
```

In SendTab.broadcast_transaction.broadcast_thread, self.payto_e.payment_identifier was referenced -
but do_clear() has already cleared it by then.
E.g. consider SendTab.pay_onchain_dialog: it calls save_pending_invoice(), which calls do_clear(),
and later (in sign_done), it calls window.broadcast_or_show, which will call SendTab.broadcast_transaction().

As there might be multiple independent transaction dialogs open simultaneously, the single shared state
send_tab.payto_e.payment_identifier approach was problematic -- I think it is conceptually nicer to
pass around the payment_identifiers as needed, as done with this change.

However, this change is not a full proper fix, as it still somewhat relies on
send_tab.payto_e.payment_identifier (e.g. in pay_onchain_dialog). Hence, e.g. when using
the invoice_list context menu "Pay..." item, as payto_e.payment_identifier is not set,
payment_identifier will be None in broadcast_transaction.

but at least we handle PI being None gracefully -- before this change, broadcast_transaction
expected PI to be set, and it was never set to the correct thing (as do_clear() already ran by then):
depending on timing it was either None or a new empty PI. In the former case, producing the above
traceback and hard failing (not only for bip70 stuff!), and in the latter, silently ignoring the logic bug.

18314 of 31053 relevant lines covered (58.98%)

3.54 hits per line

Jobs
ID Job ID Ran Files Coverage
1 5332878263844864.1 10 Jul 2023 06:42PM UTC 0
58.95
2 5332878263844864.2 10 Jul 2023 06:43PM UTC 0
58.9
3 5332878263844864.3 10 Jul 2023 06:44PM UTC 0
58.89
4 5332878263844864.4 10 Jul 2023 06:48PM UTC 0
58.95
5 5332878263844864.5 10 Jul 2023 07:02PM UTC 0
58.89
6 5332878263844864.6 10 Jul 2023 07:02PM UTC 0
58.91
Source Files on build 5332878263844864
Detailed source file information is not available for this build.
  • Back to Repo
  • Build #53328782...
  • bb8c73ca on github
  • Prev Build on master (#58720110...)
  • Next Build on master (#60785361...)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc