Skip to content

Commit

Permalink
Merge bitcoin#31016: test: add missing sync to feature_fee_estimation.py
Browse files Browse the repository at this point in the history
a1576ed test: add missing sync to feature_fee_estimation.py (Martin Zumsande)

Pull request description:

  This fixes a race:

  - In the `test_estimate_dat_is_flushed_periodically` subtest, node 0 is isolated and creates 10 blocks (no sync).
  - In `clear_estimates` the nodes are reconnected (but we don't wait for them to sync!)
  - In the `sanity_check_rbf_estimates` subtest, node 1 generates another block and syncs with the other nodes. The sync fails if the generated block is at the same height as the tip of node 0.

  Fix this by adding a sync to `clear_estimates`.

  Fixes bitcoin#30990
  Fixes bitcoin#30640

ACKs for top commit:
  maflcko:
    lgtm ACK a1576ed
  tdb3:
    code review ACK a1576ed

Tree-SHA512: 608ba619cacb4ff3a1ea934e03286f18c96afeebf06439334d40bff72025bd7bcc2c1093dae1824b30a37d3ac3ea569bc3118c33c0ca51610592aa1b4f420840
  • Loading branch information
fanquake committed Oct 2, 2024
2 parents fc642c3 + a1576ed commit 70910eb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/functional/feature_fee_estimation.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,7 @@ def clear_estimates(self):
self.start_node(0)
self.connect_nodes(0, 1)
self.connect_nodes(0, 2)
self.sync_blocks()
assert_equal(self.nodes[0].estimatesmartfee(1)["errors"], ["Insufficient data or no feerate found"])

def broadcast_and_mine(self, broadcaster, miner, feerate, count):
Expand Down

0 comments on commit 70910eb

Please sign in to comment.