From 68a39c65bddb832e36c221cb75730d1f0b89a4d9 Mon Sep 17 00:00:00 2001 From: Hanno Cornelius <68783915+jm-clius@users.noreply.github.com> Date: Fri, 5 May 2023 10:29:53 +0200 Subject: [PATCH] fix: fix filter v2 proto fields (#1716) --- waku/v2/waku_filter_v2/rpc_codec.nim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/waku/v2/waku_filter_v2/rpc_codec.nim b/waku/v2/waku_filter_v2/rpc_codec.nim index 3d5ce0db50..4de8549d0f 100644 --- a/waku/v2/waku_filter_v2/rpc_codec.nim +++ b/waku/v2/waku_filter_v2/rpc_codec.nim @@ -55,8 +55,8 @@ proc encode*(rpc: FilterSubscribeResponse): ProtoBuffer = var pb = initProtoBuffer() pb.write3(1, rpc.requestId) - pb.write3(2, rpc.statusCode) - pb.write3(3, rpc.statusDesc) + pb.write3(10, rpc.statusCode) + pb.write3(11, rpc.statusDesc) pb @@ -67,11 +67,11 @@ proc decode*(T: type FilterSubscribeResponse, buffer: seq[byte]): ProtobufResult if not ?pb.getField(1, rpc.requestId): return err(ProtobufError.missingRequiredField("request_id")) - if not ?pb.getField(2, rpc.statusCode): + if not ?pb.getField(10, rpc.statusCode): return err(ProtobufError.missingRequiredField("status_code")) var statusDesc: string - if not ?pb.getField(3, statusDesc): + if not ?pb.getField(11, statusDesc): rpc.statusDesc = none(string) else: rpc.statusDesc = some(statusDesc)