relayer
relayer copied to clipboard
Ensure `msgUpdateClient` is not nil before appending to batch in `sendBatchMessages`
In the function sendBatchMessages
, there is a logic to prepend mp.msgUpdateClient
to the beginning of the batch. However, in cases where needsClientUpdate
is false, msgUpdateClient
will be nil
. This can lead to appending a nil value into the batch, which is likely unintended and could cause issues downstream. It's necessary to introduce a check to ensure msgUpdateClient
is not nil before appending it to the batch. This precaution would prevent potential errors or unexpected behavior during the message processing workflow.