HomePhabricator

[electrum] misc cleanups of ElectrumWindow.broadcast_transaction

Description

[electrum] misc cleanups of ElectrumWindow.broadcast_transaction

Summary:
Minor code cleanups:

  • remove unnecessary variables
  • invert some logic to remove nesting (indentatation) by returning early when possible
  • use x is not None instead of not x when x is an Optional[something]
  • move same-line comments to previous line
  • add a few typehints

Test Plan: send a transaction

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D14847

Details

Provenance
PiRKAuthored on Nov 24 2023, 11:30
PiRKPushed on Nov 24 2023, 21:09
Reviewer
Restricted Project
Differential Revision
D14847: [electrum] misc cleanups of ElectrumWindow.broadcast_transaction
Parents
rABC673c6aa99519: [avalanche] Prevent a potential test failure in abc_p2p_avalanche_remote_proofs
Branches
Unknown
Tags
Unknown