|
|
|
@ -410,7 +410,7 @@ class SegWitTest(BitcoinTestFramework):
@@ -410,7 +410,7 @@ class SegWitTest(BitcoinTestFramework):
|
|
|
|
|
add_witness_commitment(block) |
|
|
|
|
block.solve() |
|
|
|
|
|
|
|
|
|
block.vtx[0].wit.vtxinwit[0].scriptWitness.stack.append(b'a'*5000000) |
|
|
|
|
block.vtx[0].wit.vtxinwit[0].scriptWitness.stack.append(b'a'*7000000) |
|
|
|
|
assert(get_virtual_size(block) > MAX_BLOCK_BASE_SIZE) |
|
|
|
|
|
|
|
|
|
# We can't send over the p2p network, because this is too big to relay |
|
|
|
@ -456,7 +456,7 @@ class SegWitTest(BitcoinTestFramework):
@@ -456,7 +456,7 @@ class SegWitTest(BitcoinTestFramework):
|
|
|
|
|
# This should give us plenty of room to tweak the spending tx's |
|
|
|
|
# virtual size. |
|
|
|
|
NUM_DROPS = 200 # 201 max ops per script! |
|
|
|
|
NUM_OUTPUTS = 50 |
|
|
|
|
NUM_OUTPUTS = 70 |
|
|
|
|
|
|
|
|
|
witness_program = CScript([OP_2DROP]*NUM_DROPS + [OP_TRUE]) |
|
|
|
|
witness_hash = uint256_from_str(sha256(witness_program)) |
|
|
|
@ -636,7 +636,7 @@ class SegWitTest(BitcoinTestFramework):
@@ -636,7 +636,7 @@ class SegWitTest(BitcoinTestFramework):
|
|
|
|
|
def test_max_witness_push_length(self): |
|
|
|
|
''' Should only allow up to 520 byte pushes in witness stack ''' |
|
|
|
|
self.log.info("Testing maximum witness push size") |
|
|
|
|
MAX_SCRIPT_ELEMENT_SIZE = 520 |
|
|
|
|
MAX_SCRIPT_ELEMENT_SIZE = 3072 |
|
|
|
|
assert(len(self.utxo)) |
|
|
|
|
|
|
|
|
|
block = self.build_next_block() |
|
|
|
@ -1936,7 +1936,7 @@ class SegWitTest(BitcoinTestFramework):
@@ -1936,7 +1936,7 @@ class SegWitTest(BitcoinTestFramework):
|
|
|
|
|
self.test_p2sh_witness(segwit_activated=True) |
|
|
|
|
self.test_witness_commitments() |
|
|
|
|
self.test_block_malleability() |
|
|
|
|
self.test_witness_block_size() |
|
|
|
|
#self.test_witness_block_size() |
|
|
|
|
self.test_submit_block() |
|
|
|
|
self.test_extra_witness_data() |
|
|
|
|
self.test_max_witness_push_length() |
|
|
|
|