HomePhabricator

[electrum] minor cleanup of Transaction.fetch_input_data

Description

[electrum] minor cleanup of Transaction.fetch_input_data

Summary:

  • put comments on previous line to let the automatic code formatting do its job
  • save some indentation levels
  • add a few typehints
  • use f-strings
  • tx_cache_put is always called with a valid Transaction, no need to check for tx is not None
  • move imports to the top of the file (they are always imported anyway by other modules, and multiple imports add no significant additional cost)

Test Plan: send a transaction between two different wallets; in the receiving wallet double-click on the tx in the history, check that the dialog knows the input amount

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Provenance
PiRKAuthored on Sep 21 2023, 07:34
PiRKPushed on Sep 21 2023, 16:26
Reviewer
Restricted Project
Differential Revision
D14514: [electrum] minor cleanup of Transaction.fetch_input_data
Parents
rABC75b8d794395d: [electrum] fix OutPoint.__str__
Branches
Unknown
Tags
Unknown