mirror of https://github.com/status-im/nim-eth.git
Fix a typo
This commit is contained in:
parent
52b5ca9c9c
commit
aa1f7f2c06
|
@ -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:
|
||||||
|
|
Loading…
Reference in New Issue