Changeset View
Changeset View
Standalone View
Standalone View
test/functional/p2p_feefilter.py
Show First 20 Lines • Show All 118 Lines • ▼ Show 20 Lines | def test_feefilter(self): | ||||
# Send one transaction from node0 that should be received, so that we | # Send one transaction from node0 that should be received, so that we | ||||
# we can sync the test on receipt (if node1's txs were relayed, they'd | # we can sync the test on receipt (if node1's txs were relayed, they'd | ||||
# be received by the time this node0 tx is received). This is | # be received by the time this node0 tx is received). This is | ||||
# unfortunately reliant on the current relay behavior where we batch up | # unfortunately reliant on the current relay behavior where we batch up | ||||
# to 35 entries in an inv, which means that when this next transaction | # to 35 entries in an inv, which means that when this next transaction | ||||
# is eligible for relay, the prior transactions from node1 are eligible | # is eligible for relay, the prior transactions from node1 are eligible | ||||
# as well. | # as well. | ||||
txids = [miniwallet.send_self_transfer(fee_rate=Decimal('200.00'), | txids = [miniwallet.send_self_transfer(fee_rate=Decimal('200.00'), | ||||
from_node=node0)['txid'] | from_node=node0)['txid']] | ||||
for _ in range(3)] | |||||
conn.wait_for_invs_to_match(txids) | conn.wait_for_invs_to_match(txids) | ||||
conn.clear_invs() | conn.clear_invs() | ||||
# must be sure node 1 has received all txs | |||||
self.sync_mempools() | |||||
self.log.info("Remove fee filter and check txs are received again") | self.log.info("Remove fee filter and check txs are received again") | ||||
conn.send_and_ping(msg_feefilter(0)) | conn.send_and_ping(msg_feefilter(0)) | ||||
txids = [miniwallet.send_self_transfer(fee_rate=Decimal('200.00'), | txids = [miniwallet.send_self_transfer(fee_rate=Decimal('200.00'), | ||||
from_node=node1)['txid'] | from_node=node1)['txid'] | ||||
for _ in range(3)] | for _ in range(3)] | ||||
conn.wait_for_invs_to_match(txids) | conn.wait_for_invs_to_match(txids) | ||||
conn.clear_invs() | conn.clear_invs() | ||||
if __name__ == '__main__': | if __name__ == '__main__': | ||||
FeeFilterTest().main() | FeeFilterTest().main() |