message: delay was completing on the wrong result, causing some test failures
diff: @@ -15,6 +15,12 @@ from test_framework.util import *
  FORK_CFG="consensus.forkNov2018Time"
  +def thereExists(lst, fn):
  + for l in lst:
  + if fn(l):
  + return True
  + return False
  +
  class MyTest (BitcoinTestFramework):
  def setup_chain(self,bitcoinConfDict=None, wallets=None):
  @@ -97,7 +103,7 @@ class MyTest (BitcoinTestFramework):
  # we need to generate another block so the CTOR chain exceeds the DTOR
  self.nodes[2].generate(1)
  sync_blocks_to(103, self.nodes[2:])
  - waitFor(10, lambda: self.nodes[0].getbestblockhash() == dtorBlock)
  + waitFor(10, lambda: thereExists(self.nodes[0].getchaintips(), lambda x: x["height"] == 103 and x["status"] != "headers-only"))
  ct = self.nodes[0].getchaintips()
  tip = next(x for x in ct if x["status"] == "active")
  assert_equal(tip["height"], 102)
  