First when I run ipfs --offline block stat <ipfs_hash>
and if the hash does not locally exist I get following message: Error: blockservice: key not found
.
-
Afterwards I run following:
ipfs object stat <ipfs_hash>
and after getting a valid output -
I run
ipfs --offline block stat <ipfs_hash>
again , now it always return valid information (hence does not give an error) even the hash is not downloaded. So assuming ifipfs --offline block stat <ipfs_hash>
gives andError
message is not correlated that the given hash is locally downloaded.
How can I resolve this in order to detect if the asked hashed is fully downloaded or not?
I can do something like ipfs refs local | grep <hash>
, but I don’t want to keep fetch all the hashes and it will be slower when there is hundreds of hashes exist.
Related: How to check is the given ipfs_hash and its linked hashes already downloaded or not?