diff --git a/libp2p/streams/chronosstream.nim b/libp2p/streams/chronosstream.nim index dd9fe7b18..0a4b9e984 100644 --- a/libp2p/streams/chronosstream.nim +++ b/libp2p/streams/chronosstream.nim @@ -17,7 +17,6 @@ logScope: const DefaultChunkSize* = 1 shl 20 # 1MB - EofTag: seq[byte] = @[] type ChronosStream* = ref object of Stream[seq[byte]] diff --git a/libp2p/streams/pushable.nim b/libp2p/streams/pushable.nim index ae512a90d..25b2385fb 100644 --- a/libp2p/streams/pushable.nim +++ b/libp2p/streams/pushable.nim @@ -55,5 +55,5 @@ proc init*(P: type[BytePushable], maxChunkSize = DefaultChunkSize): P = P(queue: newAsyncQueue[seq[byte]](1), maxChunkSize: maxChunkSize, sourceImpl: pushSource, - name: "BytePushable", - eofTag: @[]) + eofTag: @[], + name: "BytePushable") diff --git a/libp2p/streams/stream.nim b/libp2p/streams/stream.nim index 80ba762ee..12270605a 100644 --- a/libp2p/streams/stream.nim +++ b/libp2p/streams/stream.nim @@ -20,11 +20,11 @@ type Duplex*[T] = Source[T] | Sink[T] Stream*[T] = ref object of RootObj - name*: string eof*: bool sourceImpl*: proc (s: Stream[T]): Source[T] {.gcsafe.} sinkImpl*: proc(s: Stream[T]): Sink[T] {.gcsafe.} eofTag*: T + name*: string proc newStreamEofError*(): ref StreamEofError = raise newException(StreamEofError, "Stream at EOF!")