cosmos / relayer

An IBC relayer for ibc-go
Apache License 2.0
388 stars 1.71k forks source link

Ensure `msgUpdateClient` is not nil before appending to batch in `sendBatchMessages` #1406

Closed LeTrongDat closed 3 months ago

LeTrongDat commented 7 months ago

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.

jtieri commented 5 months ago

Hey @LeTrongDat I think this was also fixed in #1407, does that seem correct?

jtieri commented 3 months ago

Hey @LeTrongDat I think this was also fixed in #1407, does that seem correct?

I believe this was closed out in the issue that i mentioned here. Feel free to re-open this issue if necessary but for now i'm going to close this out.