Merge bitcoin/bitcoin#31016: test: add missing sync to feature_fee_estimation.py

a1576edab3 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 #30990
  Fixes #30640

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

Tree-SHA512: 608ba619cacb4ff3a1ea934e03286f18c96afeebf06439334d40bff72025bd7bcc2c1093dae1824b30a37d3ac3ea569bc3118c33c0ca51610592aa1b4f420840
This commit is contained in:
merge-script 2024-10-02 11:15:39 +01:00
commit 70910eb2ec
No known key found for this signature in database
GPG key ID: 2EEB9F5CC09526C1

View file

@ -398,6 +398,7 @@ class EstimateFeeTest(BitcoinTestFramework):
self.start_node(0) self.start_node(0)
self.connect_nodes(0, 1) self.connect_nodes(0, 1)
self.connect_nodes(0, 2) self.connect_nodes(0, 2)
self.sync_blocks()
assert_equal(self.nodes[0].estimatesmartfee(1)["errors"], ["Insufficient data or no feerate found"]) assert_equal(self.nodes[0].estimatesmartfee(1)["errors"], ["Insufficient data or no feerate found"])
def broadcast_and_mine(self, broadcaster, miner, feerate, count): def broadcast_and_mine(self, broadcaster, miner, feerate, count):