Secondly, I modified providers_manager.go code and just added a print statement like println("!!??ok i am here can you see me am i showing??!!")
Then I rebuilt IPFS like this go install ./cmd/ipfs and then I run ipfs daemon.
But the code I modified didnt show up.
I didnt see my print statement.
You can go build . in go-ipfs/cmd/ipfs, and run ipfs daemon (you would need to init first).
To see what I’ve changed you can just do git diff in both go-ipfs or go-libp2p-kad-dht.
but if i run ipfs daemon outside go-ipfs/cmd/ipfs folder, then its the older version of IPFS running without the edited code.
but if i run ipfs daemon inside go-ipfs/cmd/ipfs folder, then its new IPFS running with the edited code of go-libp2p-kad-dht.
btw both IPFS either run outside or inside the folder have same peer ID.
btw both IPFS either run outside or inside the folder have same peer ID.
Yes that because the binary has nothing to do with your identity, else updating IPFS would change it (which we don’t want), your identity is on unix likes stored in ~/.ipfs/, no idea on windows.
but if i run ipfs daemon outside go-ipfs/cmd/ipfs folder, then its the older version of IPFS running without the edited code.
but if i run ipfs daemon inside go-ipfs/cmd/ipfs folder, then its new IPFS running with the edited code of go-libp2p-kad-dht .
That because you are on windows and windows is confusing.
On unix ipfs reffers only to your PATH, or what is installed on your system.
To use the ipfs you just built you would use ./ipfs instead (. just means “the current directory”, so ./ipfs means “the ipfs file in the current directory”).
On windows ipfs first attempt to see if there is a binary called “ipfs” in your current directory, if not then fallback to the PATH.
Do you know by any chance if there is a way to print out from the code all the requests for CID > providers mappings you receive at your node.
Like kind of observing the network and who is providing what and who is asking for what.