Skip to content

Commit

Permalink
Add logs for debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
shleikes committed Dec 10, 2024
1 parent 4631607 commit bf4b8e5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions protocol/parser/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,14 @@ func parseBlock(rpcInput RPCInput, blockParser spectypes.BlockParser, genericPar
func ParseBlockFromParams(rpcInput RPCInput, blockParser spectypes.BlockParser, genericParsers []spectypes.GenericParser) *ParsedInput {
parsedInput := parseBlock(rpcInput, blockParser, genericParsers, PARSE_PARAMS)
ParseRawBlock(rpcInput, parsedInput, blockParser.DefaultValue)
utils.LavaFormatTrace("ParseBlockFromParams result", utils.LogAttr("parsedInput", parsedInput))
return parsedInput
}

func ParseBlockFromReply(rpcInput RPCInput, blockParser spectypes.BlockParser, genericParsers []spectypes.GenericParser) *ParsedInput {
parsedInput := parseBlock(rpcInput, blockParser, genericParsers, PARSE_RESULT)
ParseRawBlock(rpcInput, parsedInput, blockParser.DefaultValue)
utils.LavaFormatTrace("ParseBlockFromReply result", utils.LogAttr("parsedInput", parsedInput))
return parsedInput
}

Expand Down
4 changes: 4 additions & 0 deletions protocol/rpcconsumer/rpcconsumer_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -973,6 +973,10 @@ func (rpccs *RPCConsumerServer) relayInner(ctx context.Context, singleConsumerSe
utils.LavaFormatTrace("Sending relay to provider",
utils.LogAttr("GUID", ctx),
utils.LogAttr("lbUniqueId", singleConsumerSession.EndpointConnection.GetLbUniqueId()),
utils.LogAttr("providerAddress", providerPublicAddress),
utils.LogAttr("requestBlock", relayResult.Request.RelayData.RequestBlock),
utils.LogAttr("seenBlock", relayResult.Request.RelayData.SeenBlock),
utils.LogAttr("extensions", relayResult.Request.RelayData.Extensions),
)
connectCtx = metadata.NewOutgoingContext(connectCtx, metadataAdd)
defer connectCtxCancel()
Expand Down

0 comments on commit bf4b8e5

Please sign in to comment.