Logged targetClient
object is always nil when error is returned
#694
Labels
Milestone
targetClient
object is always nil when error is returned
#694
This issue was found by Trail of Bits during the audit of ICS27 Interchain Accounts
Problem Definition
The
Keeper.ConnectionOpenTry
function callsclienttypes.UnpackClientState
to obtain a target client. Whenclienttypes.UnpackClientState
returns an error, the received targetClient object is indicated in the error logs. However,clienttypes.UnpackClientState
’s errors always indicatenil
for the first returned value. As a result, the returned error will always indicate anil
target client. This reduces the utility of the error. Moreover, based on the error message format (and the%v
format specifier), it appears that the developers may have intended the function to log themsg.ClientState
instead of thetargetClient
.Proposal
Correct the
Keeper.ConnectionOpenTry
function so that, on error, it returns a message with the intended object.For Admin Use
The text was updated successfully, but these errors were encountered: