[electrum] use blockchain.transaction.get_height method
Summary:
This removes the only call for blockchain.transaction.get with verbose=True, and uses blockchain.transaction.get_height instead to get the only information we need and avoid some computation.
Also replace a try... except block with a simple check that the jsonrpc response provided to the callback has the expected type. I don't see what else could raise an error in this codepath.
Test Plan:
This codepath is only used when inspecting a transaction that does not involve the wallet. So open any wallet, go to a block explorer and copy the raw hex data for a random transaction, use the Tools > Load Transaction > From Text menu and paste the raw hex. Check that the dialog shows the correct block height for this tx.
If running Electrum ABC in verbose mode, look out for the "fetch_input_data: got tx block height" message
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Subscribers: Fabien
Differential Revision: https://reviews.bitcoinabc.org/D17354