00622 Ethereum transaction details may fail to display contract result #624
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
Root cause of this issue is located in
ContractResultByTsCache
.This class fetches contract result details for a given transaction timestamp. It does this in two steps:
api/v1/contracts/results/?timestamp=TTT
to retrieve contract idapi/v1/contracts/{contractId}/results/TTT
to retrieve full details of contract resultIn the case of transaction 1685737274.278536163, first call returns
contract_id == null
and causes fetching to stop.Changes below enhance logic above: when first call returns
contract_id == null
,ContractResultByTsCache
checks ifhash
value is available and uses it to retrieve contract result details.Changes below also include:
ContractResultByTsCache
mainnet
latest dataRelated issue(s):
Fixes #622
Notes for reviewer:
See PR for transaction test URL.
Checklist