Fix a typo

This commit is contained in:
Zahary Karadjov 2019-10-23 13:36:22 +03:00
parent 52b5ca9c9c
commit aa1f7f2c06
No known key found for this signature in database
GPG Key ID: C8936F8A3073D609
1 changed files with 4 additions and 4 deletions

View File

@ -60,7 +60,7 @@ type
version*: int version*: int
timeouts*: int64 timeouts*: int64
useRequestIds*: bool useRequestIds*: bool
useSingeRecordInlining*: bool useSingleRecordInlining*: bool
rlpxName*: string rlpxName*: string
outgoingRequestDecorator*: NimNode outgoingRequestDecorator*: NimNode
incomingRequestDecorator*: NimNode incomingRequestDecorator*: NimNode
@ -372,7 +372,7 @@ proc newMsg(protocol: P2PProtocol, kind: MessageKind, id: int,
chooseFieldType(paramType), # some types such as openarray chooseFieldType(paramType), # some types such as openarray
newEmptyNode()) # are automatically remapped newEmptyNode()) # are automatically remapped
if recFields.len == 1 and protocol.useSingeRecordInlining: if recFields.len == 1 and protocol.useSingleRecordInlining:
# When we have a single parameter, it's treated as the transferred message # When we have a single parameter, it's treated as the transferred message
# type. `recName` will be resolved to the message type that's intended # type. `recName` will be resolved to the message type that's intended
# for serialization while `strongRecName` will be a distinct type over # for serialization while `strongRecName` will be a distinct type over
@ -537,7 +537,7 @@ proc writeParamsAsRecord*(params: openarray[NimNode],
writer, recordWriterCtx, writer, recordWriterCtx,
newLit($param), param) newLit($param), param)
# TODO: this doesn't respect the `useSingeRecordInlining` option. # TODO: this doesn't respect the `useSingleRecordInlining` option.
# Right now, it's not a problem because it's used only in the libp2p back-end # Right now, it's not a problem because it's used only in the libp2p back-end
if params.len > 1: if params.len > 1:
result = quote do: result = quote do:
@ -641,7 +641,7 @@ proc genAwaitUserHandler*(msg: Message, receivedMsg: NimNode,
var userHandlerCall = newCall(msg.userHandler.name, leadingParams) var userHandlerCall = newCall(msg.userHandler.name, leadingParams)
var params = toSeq(msg.procDef.typedParams(skip = 1)) var params = toSeq(msg.procDef.typedParams(skip = 1))
if params.len == 1 and msg.protocol.useSingeRecordInlining: if params.len == 1 and msg.protocol.useSingleRecordInlining:
userHandlerCall.add receivedMsg userHandlerCall.add receivedMsg
else: else:
for p in params: for p in params: