Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CCIP price cache use DB timestamp #13133

Merged
merged 3 commits into from
May 8, 2024
Merged

Conversation

matYang
Copy link
Contributor

@matYang matYang commented May 7, 2024

@reductionista pointed out that now() wasn't incrementing was due to test statements being in the same transaction. Switching to use statement_timestamp(). This timestamp points to start of the statement and can increment in tx.

Make expiration logic based on DB timestamp. Not strictly necessary given we don't have application synchronization challenges, but good to be consistent with DB timestamp.

ClearGasPricesByDestChain(ctx context.Context, destChainSelector uint64, to time.Time) error
ClearTokenPricesByDestChain(ctx context.Context, destChainSelector uint64, to time.Time) error
ClearGasPricesByDestChain(ctx context.Context, destChainSelector uint64, expireSec int) error
ClearTokenPricesByDestChain(ctx context.Context, destChainSelector uint64, expireSec int) error
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nothing is consuming this interface yet so safe to modify

@matYang matYang marked this pull request as ready for review May 7, 2024 21:33
@matYang matYang requested a review from a team as a code owner May 7, 2024 21:33
jmank88
jmank88 previously approved these changes May 7, 2024
mateusz-sekara
mateusz-sekara previously approved these changes May 8, 2024
@matYang matYang added this pull request to the merge queue May 8, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 8, 2024
@matYang matYang added this pull request to the merge queue May 8, 2024
Merged via the queue into develop with commit 2e66837 May 8, 2024
107 checks passed
@matYang matYang deleted the ccip-price-cache-use-timestamp branch May 8, 2024 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants