filecoin-project / go-legs

Does the legwork for go-data-transfer
Apache License 2.0
20 stars 14 forks source link

legs subscriber must allow datatrasfer to be optionally set #95

Closed masih closed 2 years ago

masih commented 2 years ago

Otherwise, a lib2p host with go-legs subscriber cannot start a graphsync server, since registration of stream handler for graphsync server is singular.

It seems limiting to require users of go-legs to not start up a graphsync server if they are running a go-legs subscriber.

Consider adding the option back which was removed here.

Consider alternative approaches to guaranteeing the correctness of blockhook mechanism.

masih commented 2 years ago

Changing that option to take both datatransfer.Manager and graphsync.GraphExchange should be sufficient to allow both registration of block hook at root and instantiate if not set.

willscott commented 2 years ago

or we can add it back on just on the publisher side, right?

masih commented 2 years ago

It was never removed from the publisher side.

MarcoPolo commented 2 years ago

Done in #96