question

Upvotes
Accepted
36 6 1 14

Do I need to verify a ric from the result of ExpandChain

Greetings all

If I got the ric list by calling ExpandChain func against a chaincode, do I need to call VerifyRICs to verify each ric in that list before requesting data? Or can I assume all the results of ExpandChain are valid already?

BR.

Leon.

tick-history-rest-api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
Accepted
29 1 1 2

Hi Leon,

Usually the listed ric under chain ric will be valid. Hence you can assume that all the results of expand chain are already valid rics.

Regards,

Sunil Mahale

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Thank you for your reply sunil, but client still need to handle the invalid exception in their code right? I think they can't be tolerant to a crashed program.

Furthermore, I asked this question because results of some chaincode is really huge! Take 0#SPX*.U as an example, there are hundreds of ric codes in it, and it would take a lot of time to verify each result...

Exception handling should be part of any program ...

Upvotes
38.1k 71 35 53

It depends on ranges of date and time specified in the expandChain request. The returned RICs are valid during those period. For example, if the application call expandChain for 0#.SET100 on date 2010-09-01, the response will contain BGH.BK.

However, currently, BGH.BK is invalid because it has been renamed to BDMS.BK.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea