question

Upvotes
Accepted
36 10 5 15

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 512.0 KiB each and 1.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 512.0 KiB each and 1.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
78.8k 250 52 74

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 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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