go-data-transfer
go-data-transfer copied to clipboard
Return event but don't fail when encountering data of unknown encoding
There may be cases where the sending side of a data transfer encounters a block of data encoded with a codec that is not known to it.
Currently, as it attempts to make the ipld.Node
representation and parse such a block, it will end up with an error, which will populate up to the overall data transfer.
Instead, the raw contents of the block should still be able to be transferred un-parsed, but a channel even should be transmitted to indicate to the receiver that the node could not be parsed, and recursion into a potential dag below that item was not attempted.
The receiver can then handle that as it wishes - potentially parsing the block locally and initiating additional transfers for links it discovers.