From 7c48f80fd8d81ec7c0b9e504174b05892248380a Mon Sep 17 00:00:00 2001 From: pacien Date: Sat, 24 Nov 2018 01:02:53 +0100 Subject: Add last streamblock flag accessor --- src/streamblock.nim | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/streamblock.nim b/src/streamblock.nim index 49c3dcd..403687e 100644 --- a/src/streamblock.nim +++ b/src/streamblock.nim @@ -34,6 +34,9 @@ type StreamBlock* = object else: discard +proc isLast*(streamBlock: StreamBlock): bool = + streamBlock.last + proc readSerialised*(bitReader: BitReader): StreamBlock = result.last = bitReader.readBool() result.kind = bitReader.readBits(2, uint8).BlockKind -- cgit v1.2.3