holepunchto / hypercore

Hypercore is a secure, distributed append-only log.

Home Page:https://docs.holepunch.to

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hypercore.createProtocolStream(protomux) returns NoiseSteam, not the raw stream

gmaclennan opened this issue · comments

Hypercore.createProtocolStream() has slightly different behaviour when you pass it a Protomux instance instead of a raw duplex stream or a noise stream: in the latter cases it returns the raw outer stream (e.g. the noiseStream.rawStream), but when you pass a protomux instance it returns the noise stream. Not something that comes up much, but it's confusing.

It should always return the rawstream, will fix