message: test: add coinstatsindex getindexinfo coverage, improve current tests
diff: @@ -69,25 +69,22 @@ class RpcMiscTest(BitcoinTestFramework):
  assert_equal(node.getindexinfo(), {})
  # Restart the node with indices and wait for them to sync
  - self.restart_node(0, ["-txindex", "-blockfilterindex"])
  + self.restart_node(0, ["-txindex", "-blockfilterindex", "-coinstatsindex"])
  self.wait_until(lambda: all(i["synced"] for i in node.getindexinfo().values()))
  # Returns a list of all running indices by default
  + values = {"synced": True, "best_block_height": 200}
  assert_equal(
  node.getindexinfo(),
  {
  - "txindex": {"synced": True, "best_block_height": 200},
  - "basic block filter index": {"synced": True, "best_block_height": 200}
  + "txindex": values,
  + "basic block filter index": values,
  + "coinstatsindex": values,
  }
  )
  -
  # Specifying an index by name returns only the status of that index
  - assert_equal(
  - node.getindexinfo("txindex"),
  - {
  - "txindex": {"synced": True, "best_block_height": 200},
  - }
  - )
  + for i in {"txindex", "basic block filter index", "coinstatsindex"}:
  + assert_equal(node.getindexinfo(i), {i: values})
  # Specifying an unknown index name returns an empty result
  assert_equal(node.getindexinfo("foo"), {})
  