How to get a reference of the current running node (node *core.IpfsNode)?

Guys, help please.

I’m pretty new to the IPFS repo stuff and struggling to make some experimental changes.

As the topic said, how to get a reference of the current running node (core.IpfsNode), within bitswap/wantmanager.go?

@mwy001 Could we please get some more context? What are you attempting to do with the core.IpfsNode in bitswap/wantmanager.go?

@lanzafame I actually want to access the local datastore in bitswap/wantmanager.go. I notice that it can be accessed by n.Repo.Datastore(), that’s why the IpfsNode is needed.
This is finally solved by passing the Datastore object through the method call chain into wantmanager.go,maybe some terrible code, anyway it works now (~_~))
Thank you anyway sir.