From de243e23b6e610a81bdddd2132e7f2532b5c6548 Mon Sep 17 00:00:00 2001 From: rj Date: Tue, 20 Nov 2018 14:50:32 -0800 Subject: [PATCH] Remove tx is too large check --- riemann/tests/tx/test_tx.py | 12 ------------ riemann/tx/tx.py | 5 ----- 2 files changed, 17 deletions(-) diff --git a/riemann/tests/tx/test_tx.py b/riemann/tests/tx/test_tx.py index 4ea7c7a..f7f4521 100644 --- a/riemann/tests/tx/test_tx.py +++ b/riemann/tests/tx/test_tx.py @@ -438,18 +438,6 @@ def test_tx_inandout(self): 'Invalid TxOut. Expected instance of TxOut. Got int', str(context.exception)) - with self.assertRaises(ValueError) as context: - tx_in = self.tx_ins[0].copy(stack_script=b'\x00' * 1616, - redeem_script=None) - tx_ins = [tx_in for _ in range(255)] - tx_outs = [self.tx_outs[0] for _ in range(255)] - tx.Tx(self.version, self.none_flag, tx_ins, tx_outs, - None, self.lock_time) - - self.assertIn( - 'Tx is too large. Expect less than 100kB. Got: ', - str(context.exception)) - def test_tx_inout_mutation(self): t = tx.Tx(self.version, self.none_flag, self.tx_ins, self.tx_outs, self.none_witnesses, self.lock_time) diff --git a/riemann/tx/tx.py b/riemann/tx/tx.py index 1ba7115..4790d79 100644 --- a/riemann/tx/tx.py +++ b/riemann/tx/tx.py @@ -325,11 +325,6 @@ def __init__(self, version, flag, tx_ins, else None self.lock_time = lock_time - if len(self) > 100000: - raise ValueError( - 'Tx is too large. ' - 'Expect less than 100kB. Got: {} bytes'.format(len(self))) - if flag is not None: self.tx_id_le = utils.hash256(self.no_witness()) self.wtx_id_le = utils.hash256(self.to_bytes())