scanblocks
Summary
Return relevant blockhashes for given descriptors (requires blockfilterindex).
Description
Return relevant blockhashes for given descriptors (requires blockfilterindex). This call may take several minutes. Make sure to use no RPC timeout (qbit-cli -rpcclienttimeout=0)
Arguments
action(STR, required): The action to execute "start" for starting a scan "abort" for aborting the current scan (returns true when abort was successful) "status" for progress report (in %) of the current scanscanobjects(ARR): Array of scan objects. Required for "start" action Every scan object is either a string descriptor or an object:descriptor(STR): An output descriptorvalue(OBJ): An object with output descriptor and metadatadesc(STR, required): An output descriptorrange(RANGE): The range of HD chain indexes to explore (either end or [begin,end])
start_height(NUM): Height to start to scan fromstop_height(NUM): Height to stop to scanfiltertype(STR): The type name of the filteroptions(OBJ_NAMED_PARAMS): No description.filter_false_positives(BOOL): Filter false positives (slower and may fail on pruned nodes). Otherwise they may occur at a rate of 1/M
Results
value(NONE): No description.value(OBJ): No description.from_height(NUM): The height we started the scan fromto_height(NUM): The height we ended the scan atrelevant_blocks(ARR): Blocks that may have matched a scanobject.blockhash(STR_HEX): A relevant blockhash
completed(BOOL): true if the scan process was not abortedvalue(OBJ): No description.progress(NUM): Approximate percent completecurrent_height(NUM): Height of the block currently being scannedsuccess(BOOL): True if scan will be aborted (not necessarily before this RPC returns), or false if there is no scan to abort
Examples
qbit-cli scanblocks start '["addr(qbrt1zqqqsyqcyq5rqwzqfpg9scrgwpugpzysnzs23v9ccrydpk8qarc0s8kqqny)"]' 300000
qbit-cli scanblocks start '["addr(qbrt1zqqqsyqcyq5rqwzqfpg9scrgwpugpzysnzs23v9ccrydpk8qarc0s8kqqny)"]' 100 150 basic
qbit-cli scanblocks status
curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "scanblocks", "params": ["start", ["addr(qbrt1zqqqsyqcyq5rqwzqfpg9scrgwpugpzysnzs23v9ccrydpk8qarc0s8kqqny)"], 300000]}' -H 'content-type: application/json' http://127.0.0.1:8352/
curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "scanblocks", "params": ["start", ["addr(qbrt1zqqqsyqcyq5rqwzqfpg9scrgwpugpzysnzs23v9ccrydpk8qarc0s8kqqny)"], 100, 150, "basic"]}' -H 'content-type: application/json' http://127.0.0.1:8352/
curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "scanblocks", "params": ["status"]}' -H 'content-type: application/json' http://127.0.0.1:8352/