From cd49839bc0375bf66882d6d77834f6e6986549fb Mon Sep 17 00:00:00 2001 From: SomberNight Date: Thu, 7 Nov 2019 07:07:02 +0100 Subject: [PATCH] transaction: helpful error msg if user tries to load old partial tx --- electrum/transaction.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/electrum/transaction.py b/electrum/transaction.py index 5ca5e0611..e010efac1 100644 --- a/electrum/transaction.py +++ b/electrum/transaction.py @@ -913,7 +913,10 @@ def tx_from_any(raw: Union[str, bytes]) -> Union['PartialTransaction', 'Transact try: return PartialTransaction.from_raw_psbt(raw) except BadHeaderMagic: - pass + if raw[:10] == b'EPTF\xff'.hex(): + raise Exception("Partial transactions generated with old Electrum versions " + "(< 4.0) are no longer supported. Please upgrade Electrum on " + "the other machine where this transaction was created.") tx = Transaction(raw) tx.deserialize() return tx