def test_policy_rejection_types(self):
        """Take a look at that every coverage rejection kind provides transactions to additional pool."""
        self.log.data("Testing coverage rejection varieties for additional pool...")
        self.restart_node_with_limit(rely=100)
        rejection_types = ["dust", "low_fee", "op_return_size", "nonstandard_script"]
        rejected_txs = []
        for rejection_type in rejection_types:
            self.log.data(f"Testing {rejection_type} rejection...")
            tx_info = self.create_policy_rejected_tx(rejection_type)
            tx_obj = tx_from_hex(tx_info['hex'])
            self.segwit_node.send_message(msg_tx(tx_obj))
            rejected_txs.append({
                'kind': rejection_type,
                'tx_info': tx_info,
                'txid': tx_info['tx'].hash,
                'wtxid': tx_info['tx'].getwtxid()
            })
        self.segwit_node.sync_with_ping()
        mempool = self.nodes[0].getrawmempool()
        for rejected in rejected_txs:
            assert_equal(rejected['txid'] in mempool, False)
            self.log.data(f"✓ {rejected['type']} transaction rejected from mempool")
        indices = record(vary(len(rejected_txs)))
        tx_list = [r['tx_info'] for r in rejected_txs]
        consequence = self.send_compact_block(tx_list, indices)
        assert_equal(consequence["missing_indices"], [])
        self.log.data("✓ All rejected transactions can be found in additional pool")
    def test_extratxnpool_disabled(self):
        """Take a look at that setting rely to 0 disables the additional transaction pool."""
        self.log.data("Testing disabled additional transaction pool (0 capability)...")
        self.restart_node_with_limit(rely=0)
        buffersize = 5
        rejected_txs = self.populate_extra_pool(buffersize)
        indices = record(vary(buffersize))
        consequence = self.send_compact_block(rejected_txs, indices)
        assert_equal(consequence["missing_indices"], indices)
        self.log.data(f"✓ All {buffersize} transactions are lacking (additional txn pool disabled)")
These practical checks show that additional pool helps in compact block reconstruction. With the elevated restrict for blockreconstructionextratxn and addition of blockreconstructionextratxnsize in v29.1, 20-40% rejected transactions will be cached in reminiscence and used for block reconstruction.
Be aware: Additional pool evictions comply with FIFO and it shops rejected transactions. So, an attacker can fill the additional pool with irrelevant transactions without charge. It’ll have an effect on the reminiscence utilization and compact block reconstruction.
