From 8863b6f294e352ada2298cf2d7a5ee3012c43b7d Mon Sep 17 00:00:00 2001 From: ThomasV Date: Sun, 18 Jan 2015 17:23:21 +0100 Subject: [PATCH] remove remaining instances of op_return type --- gui/qt/main_window.py | 6 ++---- lib/transaction.py | 5 ----- lib/wallet.py | 3 --- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py index 9a8b41c2..a3010c23 100644 --- a/gui/qt/main_window.py +++ b/gui/qt/main_window.py @@ -1081,13 +1081,11 @@ class ElectrumWindow(QMainWindow): QMessageBox.warning(self, _('Error'), _('No outputs'), _('OK')) return - for type, addr, amount in outputs: + for _type, addr, amount in outputs: if addr is None: QMessageBox.warning(self, _('Error'), _('Bitcoin Address is None'), _('OK')) return - if type == 'op_return': - continue - if type == 'address' and not bitcoin.is_address(addr): + if _type == 'address' and not bitcoin.is_address(addr): QMessageBox.warning(self, _('Error'), _('Invalid Bitcoin Address'), _('OK')) return if amount is None: diff --git a/lib/transaction.py b/lib/transaction.py index 0d3bd06d..5d65532e 100644 --- a/lib/transaction.py +++ b/lib/transaction.py @@ -419,11 +419,6 @@ def get_address_from_output_script(bytes): if match_decoded(decoded, match): return 'address', hash_160_to_bc_address(decoded[1][1],5) - # OP_RETURN - match = [ opcodes.OP_RETURN, opcodes.OP_PUSHDATA4 ] - if match_decoded(decoded, match): - return 'op_return', decoded[1][1] - return 'script', bytes diff --git a/lib/wallet.py b/lib/wallet.py index b37b92a3..198eae53 100644 --- a/lib/wallet.py +++ b/lib/wallet.py @@ -685,9 +685,6 @@ class Abstract_Wallet(object): def make_unsigned_transaction(self, outputs, fixed_fee=None, change_addr=None, domain=None, coins=None ): # check outputs for type, data, value in outputs: - if type == 'op_return': - assert len(data) < 41, "string too long" - #assert value == 0 if type == 'address': assert is_address(data), "Address " + data + " is invalid!"