即使某些键在给定范围的输入的世界状态中不存在,getStateByRange仍然有效吗?

I want to query the world state in hyperledger fabric.I'm new to it and want to know does getStateByRange throws error if some of the keys are not present in the worldstate.e.g if the ledger has values for keys '1' and '4' and if I give the start range as 1 and endrange as 5 as arguements in getStateByRange,Will it throw error?

Yes it would work without any issues.

Example: You have keys 1,2,3,4 in the state,so when you query getstatebyrange(1,5) it would leave out the last key so the data you would get for the keys 1, 2, 3, 4

Note:The getSateByRange returns the data in a lexical order i.e. dictionary order.