[electrum] use the default sequence as fallback for Transaction.txinputs()
Summary:
The sequence is not necessarily defined for transaction inputs. As the tx size estimation now depends on txinputs, it needs to work when building a fresh transaction from inputs and outputs. Use the default sequence, like the rest of the Transaction code does in this case.
Add a unit test to catch this particular regression.
Also add __hash__ methods to the various objects so that TxInput can be used in sets. This simplifies the comparison of randomized lists of inputs.
Test Plan:
python test_runner.py
In the application, go to the send tab, paste an address and type in a value, click "preview" and check that there is no error pop-up.
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D14454