Skip to content

Commit 1e16b10

Browse files
committed
Merge bitcoin/bitcoin#30340: test: Added coverage to Block not found error using gettxoutsetinfo
8ec24bd test: Added coverage to Block not found error using gettxoutsetinfo (kevkevinpal) Pull request description: #### Description There were no tests that checked for the `Block not found` error called in `ParseHashOrHeight` when using `gettxoutsetinfo`, this change adds coverage to it. You can see there are no tests that do the following by doing the below `grep -nri "Block not found.*gettxoutsetinfo" ./test/functional/` which leads to no results ACKs for top commit: achow101: ACK 8ec24bd tdb3: ACK 8ec24bd kristapsk: ACK 8ec24bd brunoerg: crACK 8ec24bd alfonsoromanz: Re ACK 8ec24bd Tree-SHA512: 2c61c681e7304c679cc3d7dd13af1b795780e85716c25c7423d68104e253d01271e048e21bc21be35dbc7ec1a4fde94e439542f3cfd669fe5a16478c5fa982ab
2 parents 6afc707 + 8ec24bd commit 1e16b10

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/functional/feature_coinstatsindex.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,9 @@ def _test_coin_stats_index(self):
242242
res12 = index_node.gettxoutsetinfo('muhash')
243243
assert_equal(res12, res10)
244244

245+
self.log.info("Test obtaining info for a non-existent block hash")
246+
assert_raises_rpc_error(-5, "Block not found", index_node.gettxoutsetinfo, hash_type="none", hash_or_height="ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", use_index=True)
247+
245248
def _test_use_index_option(self):
246249
self.log.info("Test use_index option for nodes running the index")
247250

0 commit comments

Comments
 (0)