Update eth/p2p/rlpx.nim

Co-authored-by: Kim De Mey <kim.demey@gmail.com>
This commit is contained in:
Jordan Hrycaj 2022-03-25 09:11:47 +00:00 committed by GitHub
parent 2e41d2892e
commit f214dd8db3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -63,7 +63,7 @@ proc read(rlp: var Rlp; T: type DisconnectionReasonList): T
# used by `bor`, a `geth` fork # used by `bor`, a `geth` fork
var subList = rlp.toBytes.rlpFromBytes var subList = rlp.toBytes.rlpFromBytes
if subList.isList: if subList.isList:
# Diddo, see above. # Ditto, see above.
let a = subList.read(array[1,DisconnectionReason]) let a = subList.read(array[1,DisconnectionReason])
return DisconnectionReasonList(value: a[0]) return DisconnectionReasonList(value: a[0])
raise newException(RlpTypeMismatch, "Single entry list expected") raise newException(RlpTypeMismatch, "Single entry list expected")