From 464d75d159ecaa7d20bf181707187402da1b6972 Mon Sep 17 00:00:00 2001 From: Dmitriy Ryajov Date: Fri, 4 Oct 2019 10:04:21 -0600 Subject: [PATCH] minor style fixes --- libp2p/multistream.nim | 18 ++++++++++-------- libp2p/protocols/identify.nim | 9 +++++---- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/libp2p/multistream.nim b/libp2p/multistream.nim index e2f9d71d0..7fb8b4545 100644 --- a/libp2p/multistream.nim +++ b/libp2p/multistream.nim @@ -9,19 +9,21 @@ import sequtils, strutils, strformat import chronos, chronicles -import connection, - varint, - vbuffer, +import connection, + varint, + vbuffer, protocols/protocol logScope: topic = "Multistream" -const MsgSize* = 64*1024 -const Codec* = "/multistream/1.0.0" -const MSCodec* = "\x13" & Codec & "\n" -const Na = "\x03na\n" -const Ls = "\x03ls\n" +const + MsgSize* = 64*1024 + Codec* = "/multistream/1.0.0" + + MSCodec* = "\x13" & Codec & "\n" + Na = "\x03na\n" + Ls = "\x03ls\n" type MultisteamSelectException = object of CatchableError diff --git a/libp2p/protocols/identify.nim b/libp2p/protocols/identify.nim index 89d33dc7b..540409098 100644 --- a/libp2p/protocols/identify.nim +++ b/libp2p/protocols/identify.nim @@ -20,10 +20,11 @@ import ../protobuf/minprotobuf, logScope: topic = "identify" -const IdentifyCodec* = "/ipfs/id/1.0.0" -const IdentifyPushCodec* = "/ipfs/id/push/1.0.0" -const ProtoVersion* = "ipfs/0.1.0" -const AgentVersion* = "nim-libp2p/0.0.1" +const + IdentifyCodec* = "/ipfs/id/1.0.0" + IdentifyPushCodec* = "/ipfs/id/push/1.0.0" + ProtoVersion* = "ipfs/0.1.0" + AgentVersion* = "nim-libp2p/0.0.1" #TODO: implment push identify, leaving out for now as it is not essential