You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we have multiple locations performing the same task of populating JSON with transaction data, taking into account client-selected API version. As we add more API versions in the future, all these locations will accumulate complexity, while essentially doing the same task. Ideally we should improve code cohesion / reduce duplication by pulling all this logic into single location e.g. STTx::populateJson(Json::Value& target, ReadView const& ledger, unsigned apiVersion ... etc.) (not necessarily inside STTx , just an example).
There are two challenges that need to be solved:
first challenge is pulling the necessary data while managing dependencies (levelization) on ledger, master ledger, context etc. These data are (using JSON names):
validated
close_time_iso / date
ledger_index / inLedger
ledger_hash
second challenge is related to how we pre-populate transaction JSON for any API version inNetworkOPs.cpp and then adjust it accordingly for a specific version:
perhaps want to populate JSON for a specific API version,
then create function that will transform this JSON from one API version to another ?
The text was updated successfully, but these errors were encountered:
I'll mention that clio has exactly the same problems and the added difficulty that it wants to remain in lock step with what rippled supports. You might check in with the clio folks to see if there's some way these changes can be available to both rippled and clio?
Currently we have multiple locations performing the same task of populating JSON with transaction data, taking into account client-selected API version. As we add more API versions in the future, all these locations will accumulate complexity, while essentially doing the same task. Ideally we should improve code cohesion / reduce duplication by pulling all this logic into single location e.g.
STTx::populateJson(Json::Value& target, ReadView const& ledger, unsigned apiVersion ... etc.)
(not necessarily insideSTTx
, just an example).There are two challenges that need to be solved:
validated
close_time_iso
/date
ledger_index
/inLedger
ledger_hash
NetworkOPs.cpp
and then adjust it accordingly for a specific version:The text was updated successfully, but these errors were encountered: