From c82e350e6372bd85e571d6ac51c2cdf366a6e2d2 Mon Sep 17 00:00:00 2001 From: Enrique Jose Avila Asapche Date: Thu, 10 Mar 2022 20:24:04 +0000 Subject: [PATCH] fixed marshalling error with nil (#354) * fixed marshalling error with nil * returning empty byte slice * returning empty byte slice pt2 --- txpool/grpc_server.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/txpool/grpc_server.go b/txpool/grpc_server.go index 54a0e1f50..c4ef964e6 100644 --- a/txpool/grpc_server.go +++ b/txpool/grpc_server.go @@ -269,6 +269,10 @@ func (s *GrpcServer) Transactions(ctx context.Context, in *txpool_proto.Transact if err != nil { return nil, err } + if txnRlp == nil { + reply.RlpTxs[i] = []byte{} + continue + } reply.RlpTxs[i] = txnRlp }