diff --git a/packages/client/lib/net/protocol/rlpxsender.ts b/packages/client/lib/net/protocol/rlpxsender.ts index 1d3a0b685a..bdf49d188a 100644 --- a/packages/client/lib/net/protocol/rlpxsender.ts +++ b/packages/client/lib/net/protocol/rlpxsender.ts @@ -45,7 +45,8 @@ export class RlpxSender extends Sender { */ sendMessage(code: number, data: any) { try { - this.sender._send(code, rlp.encode(data)) + //@ts-ignore "type number is not assignable to type never" + this.sender.sendMessage(code, data) } catch (err) { this.emit('error', err) } diff --git a/packages/client/test/net/protocol/rlpxsender.spec.ts b/packages/client/test/net/protocol/rlpxsender.spec.ts index 8906300274..37088a3650 100644 --- a/packages/client/test/net/protocol/rlpxsender.spec.ts +++ b/packages/client/test/net/protocol/rlpxsender.spec.ts @@ -21,7 +21,7 @@ tape('[RlpxSender]', (t) => { const rlpxProtocol = td.object() as any const sender = new RlpxSender(rlpxProtocol) sender.sendMessage(1, 5) - td.verify(rlpxProtocol._send(1, rlp.encode(5))) + td.verify(rlpxProtocol.sendMessage(1, 5)) td.reset() t.pass('message sent') t.end()