[Bug]: ABCI Query to CometRPC with height: 0
does not query most recent height
#23481
Closed
1 task done
Labels
Is there an existing issue for this?
What happened?
When querying the CometRPC with a height of 0, I expected to get the latest height.
But it actually queried the first block.
I think this section of code is the culprit because moving the condition
req.Height == 0
to the top of the function fixes the issue and requesting a0
or empty height returns the latest data like it should.cosmos-sdk/server/v2/cometbft/abci.go
Lines 176 to 190 in 6d12b1d
Cosmos SDK Version
main
How to reproduce?
Query with
"height": 0
You can see that it returns
"0"
tooQuery with non-zero height
Here it respects the requested height and returns the data from it.
The text was updated successfully, but these errors were encountered: