Closed GeorgePapageorgakis closed 9 months ago
Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review. In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additional round trips is useful! We currently aim to give initial feedback within two business days. If this does not happen, feel free to leave a comment. Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:
Finally, remember to use https://discuss.ipfs.io if you just need general support.
Hello,
I am new in IPFS and I am trying to setup a new boxo ipfs network in my app using bitswap based on the example Downloading a UnixFS file
However, I cannot find any documentation about how am I supposed to get the file from the peer. The example was just a server client with
offline.Exchange
blockstore. I am at a point where my app crashes when I try to attach a file to DAG in the case where I have already instatiated theblockservice.New..
withBitSwap
instead ofoffline.Exchange(bs)
.Here are some logs and code.
Here is the peer from whom I send the file using the "offline.Exchange(bs)"
On the other side the other peer that I send the CID to, cannot find it as expected:
However, when I change the BlockService instantiation to pass the bitswap as parameter in startBitSwapServer func: bsrv := blockservice.New(bs, bswap)
My app crashes and I get a runtime error:
CODE:
I start the ipfs service from my main module as:
This func sends the file CID in the corresponding peers:
here I read the stream on the
Receiver
peer:and here is the actual implementation of IPFS based on the example. I am not sure that
func AddFileToIPFSNetwork()
is correct though: