v31.1-roots.1 · Commit 3: [PATCH 03/17] feat(policy): preserve cluster accounting and repair dynamic dust
test/functional/mempool_datacarrier.py
Before: test/functional/mempool_datacarrier.py · After: test/functional/mempool_datacarrier.py
File metadata
index 09f48cd35f6b28156be3098b59660df4d6fe6df7..7ffae6a1cc062663a65f232c07e483827d0ec3e1 100755
Download original patch · Release notes
Diff rows 1–19 of 19. Line numbers refer to the original before/after files.
+ Added− RemovedUnmarked lines are context.
Scroll the code area horizontally to read long lines. The two line-number columns refer to before and after.
test/functional/mempool_datacarrier.py
CHANGED
|
@@ -148,7 +148,18 @@ class DataCarrierTest(BitcoinTestFramework):
|
|
|
148
148
|
self.restart_node(0, extra_args=["-datacarriersize=100000", "-maxscriptsize=100000"])
|
|
149
149
|
self.test_null_data_transaction(node=self.nodes[0], data=randbytes(MAX_STANDARD_TX_WEIGHT // 4 - 200), success=True)
|
|
150
150
|
|
|
151
|
-
# Extreme cost accounting/valid-block coverage follows in L8.
|
|
151
|
+
self.log.info("Testing the maximum carrier-cost setting without overflowing virtual size.")
|
|
152
|
+
self.restart_node(0, extra_args=["-datacarriercost=1073741823.75"])
|
|
153
|
+
tx = self.wallet.create_self_transfer(fee_rate=0)["tx"]
|
|
154
|
+
tx.vout.append(CTxOut(0, CScript([OP_RETURN, b"x" * 80])))
|
|
155
|
+
tx.vout[0].nValue -= tx.get_vsize()
|
|
156
|
+
tx_hex = tx.serialize().hex()
|
|
157
|
+
result = self.nodes[0].testmempoolaccept([tx_hex])[0]
|
|
158
|
+
assert_equal(result["allowed"], False)
|
|
159
|
+
assert_equal(result["reject-reason"], "min relay fee not met")
|
|
160
|
+
# An extreme local fee policy still cannot invalidate a valid block.
|
|
161
|
+
self.generateblock(self.nodes[0], output="raw(42)", transactions=[tx_hex], sync_fun=self.no_op)
|
|
162
|
+
|
|
152
163
|
self.stop_node(0)
|
|
153
164
|
for cost in ["-1", "1073741823.76", "1e999", "invalid"]:
|
|
154
165
|
self.nodes[0].assert_start_raises_init_error(
|