mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-18 22:35:39 +01:00
index, rpc: Add use_index option for gettxoutsetinfo
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user