diff options
author | Fabian Jahr <fjahr@protonmail.com> | 2021-02-28 19:27:00 +0100 |
---|---|---|
committer | Fabian Jahr <fjahr@protonmail.com> | 2021-04-19 21:11:33 +0200 |
commit | b9362392aef2689bc106c20925859ede555d082b (patch) | |
tree | b8437b8db02cfe99a5d0626bdf16b6699b477eaf /test | |
parent | bb7788b121a30489bc81a1f46dde6a9b19ae4ec1 (diff) | |
download | bitcoin-b9362392aef2689bc106c20925859ede555d082b.tar.xz |
index, rpc: Add use_index option for gettxoutsetinfo
Diffstat (limited to 'test')
-rwxr-xr-x | test/functional/feature_coinstatsindex.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/functional/feature_coinstatsindex.py b/test/functional/feature_coinstatsindex.py index d517c149cd..9b368f929e 100755 --- a/test/functional/feature_coinstatsindex.py +++ b/test/functional/feature_coinstatsindex.py @@ -50,6 +50,7 @@ class CoinStatsIndexTest(BitcoinTestFramework): def run_test(self): self._test_coin_stats_index() + self._test_use_index_option() def block_sanity_check(self, block_info): block_subsidy = 50 @@ -236,6 +237,16 @@ class CoinStatsIndexTest(BitcoinTestFramework): res10 = index_node.gettxoutsetinfo('muhash') assert(res8['txouts'] < res10['txouts']) + def _test_use_index_option(self): + self.log.info("Test use_index option for nodes running the index") + + self.connect_nodes(0, 1) + self.nodes[0].waitforblockheight(110) + res = self.nodes[0].gettxoutsetinfo('muhash') + option_res = self.nodes[1].gettxoutsetinfo(hash_type='muhash', hash_or_height=None, use_index=False) + del res['disk_size'], option_res['disk_size'] + assert_equal(res, option_res) + if __name__ == '__main__': CoinStatsIndexTest().main() |