@@ -66,25 +66,22 @@ def run_test(self):
66
66
assert_equal (node .getindexinfo (), {})
67
67
68
68
# Restart the node with indices and wait for them to sync
69
- self .restart_node (0 , ["-txindex" , "-blockfilterindex" ])
69
+ self .restart_node (0 , ["-txindex" , "-blockfilterindex" , "-coinstatsindex" ])
70
70
self .wait_until (lambda : all (i ["synced" ] for i in node .getindexinfo ().values ()))
71
71
72
72
# Returns a list of all running indices by default
73
+ values = {"synced" : True , "best_block_height" : 200 }
73
74
assert_equal (
74
75
node .getindexinfo (),
75
76
{
76
- "txindex" : {"synced" : True , "best_block_height" : 200 },
77
- "basic block filter index" : {"synced" : True , "best_block_height" : 200 }
77
+ "txindex" : values ,
78
+ "basic block filter index" : values ,
79
+ "coinstatsindex" : values ,
78
80
}
79
81
)
80
-
81
82
# Specifying an index by name returns only the status of that index
82
- assert_equal (
83
- node .getindexinfo ("txindex" ),
84
- {
85
- "txindex" : {"synced" : True , "best_block_height" : 200 },
86
- }
87
- )
83
+ for i in {"txindex" , "basic block filter index" , "coinstatsindex" }:
84
+ assert_equal (node .getindexinfo (i ), {i : values })
88
85
89
86
# Specifying an unknown index name returns an empty result
90
87
assert_equal (node .getindexinfo ("foo" ), {})
0 commit comments