Skip to content

Commit

Permalink
fix: decodeFindNode
Browse files Browse the repository at this point in the history
  • Loading branch information
samlior authored Jul 6, 2021
1 parent a409443 commit ac6c707
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/message/decode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ function decodeFindNode(data: Buffer): IFindNodeMessage {
if (!Array.isArray(rlpRaw[1])) {
throw new Error(ERR_INVALID_MESSAGE);
}
const distances = ((rlpRaw[1] as unknown) as Buffer[]).map((x) => (x.length ? x.readUInt8(0) : 0));
const distances = ((rlpRaw[1] as unknown) as Buffer[]).map((x) => (x.length ? x.readUIntBE(0, x.length) : 0));
return {
type: MessageType.FINDNODE,
id: toBigIntBE(rlpRaw[0]),
Expand Down

0 comments on commit ac6c707

Please sign in to comment.