Merge #12746: tests: Remove unused argument max_invalid from check_estimates(...)
a004eb1dae
tests: Remove unused argument max_invalid from check_estimates(...) (practicalswift)
Pull request description:
Remove unused argument `max_invalid` from `check_estimates(...)`.
_Note to reviewers:_ Let me know if `check_estimates(...)` is incomplete and should be fixed instead.
Tree-SHA512: 93d250184f63baa18212d13960e35ce31ebec574dbbb1af8c40f8f3aa92264b4d03878cb33b7e4e6341e0ef28fa4c1c61ad78e8f3eb0ebd78b8ced45964f362a
This commit is contained in:
commit
2405ce1df0
1 changed files with 4 additions and 4 deletions
|
@ -99,7 +99,7 @@ def split_inputs(from_node, txins, txouts, initial_split=False):
|
||||||
txouts.append({"txid": txid, "vout": 0, "amount": half_change})
|
txouts.append({"txid": txid, "vout": 0, "amount": half_change})
|
||||||
txouts.append({"txid": txid, "vout": 1, "amount": rem_change})
|
txouts.append({"txid": txid, "vout": 1, "amount": rem_change})
|
||||||
|
|
||||||
def check_estimates(node, fees_seen, max_invalid):
|
def check_estimates(node, fees_seen):
|
||||||
"""Call estimatesmartfee and verify that the estimates meet certain invariants."""
|
"""Call estimatesmartfee and verify that the estimates meet certain invariants."""
|
||||||
|
|
||||||
delta = 1.0e-6 # account for rounding error
|
delta = 1.0e-6 # account for rounding error
|
||||||
|
@ -219,13 +219,13 @@ class EstimateFeeTest(BitcoinTestFramework):
|
||||||
self.log.info("Creating transactions and mining them with a block size that can't keep up")
|
self.log.info("Creating transactions and mining them with a block size that can't keep up")
|
||||||
# Create transactions and mine 10 small blocks with node 2, but create txs faster than we can mine
|
# Create transactions and mine 10 small blocks with node 2, but create txs faster than we can mine
|
||||||
self.transact_and_mine(10, self.nodes[2])
|
self.transact_and_mine(10, self.nodes[2])
|
||||||
check_estimates(self.nodes[1], self.fees_per_kb, 14)
|
check_estimates(self.nodes[1], self.fees_per_kb)
|
||||||
|
|
||||||
self.log.info("Creating transactions and mining them at a block size that is just big enough")
|
self.log.info("Creating transactions and mining them at a block size that is just big enough")
|
||||||
# Generate transactions while mining 10 more blocks, this time with node1
|
# Generate transactions while mining 10 more blocks, this time with node1
|
||||||
# which mines blocks with capacity just above the rate that transactions are being created
|
# which mines blocks with capacity just above the rate that transactions are being created
|
||||||
self.transact_and_mine(10, self.nodes[1])
|
self.transact_and_mine(10, self.nodes[1])
|
||||||
check_estimates(self.nodes[1], self.fees_per_kb, 2)
|
check_estimates(self.nodes[1], self.fees_per_kb)
|
||||||
|
|
||||||
# Finish by mining a normal-sized block:
|
# Finish by mining a normal-sized block:
|
||||||
while len(self.nodes[1].getrawmempool()) > 0:
|
while len(self.nodes[1].getrawmempool()) > 0:
|
||||||
|
@ -233,7 +233,7 @@ class EstimateFeeTest(BitcoinTestFramework):
|
||||||
|
|
||||||
sync_blocks(self.nodes[0:3], wait=.1)
|
sync_blocks(self.nodes[0:3], wait=.1)
|
||||||
self.log.info("Final estimates after emptying mempools")
|
self.log.info("Final estimates after emptying mempools")
|
||||||
check_estimates(self.nodes[1], self.fees_per_kb, 2)
|
check_estimates(self.nodes[1], self.fees_per_kb)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
EstimateFeeTest().main()
|
EstimateFeeTest().main()
|
||||||
|
|
Loading…
Reference in a new issue