From 0d4322f37778b120d5e0c67544a4604f45767d9e Mon Sep 17 00:00:00 2001 From: Joe Bowman Date: Wed, 29 May 2024 21:55:51 +0100 Subject: [PATCH] fix CL pool valid key length check (#1634) --- x/participationrewards/keeper/callbacks.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x/participationrewards/keeper/callbacks.go b/x/participationrewards/keeper/callbacks.go index 0dfec4458..892bab1cd 100644 --- a/x/participationrewards/keeper/callbacks.go +++ b/x/participationrewards/keeper/callbacks.go @@ -171,8 +171,8 @@ func OsmosisClPoolUpdateCallback(ctx sdk.Context, k *Keeper, response []byte, qu return err } - // check query.Request is at least 9 bytes in length. (0x02 + 8 bytes for uint64) - if len(query.Request) < 5 { + // check query.Request is at least 2 bytes - 0x03 + poolID + if len(query.Request) < 2 { return errors.New("query request not sufficient length") } // assert first character is 0x03 as expected (cl pool prefix)