Closed golangisfun123 closed 2 months ago
The changes involve modifying a method call in the limiter.go
file and introducing a new method in the getters.go
file. The GetFinalityConfirmations
method is replaced with GetLimitConfirmations
to adjust how confirmation limits are determined based on the transaction's origin chain ID. Additionally, the new method GetLimitConfirmations
is added to the Config
struct to enhance the retrieval of confirmation limits for different chain configurations.
Files | Change Summary |
---|---|
services/rfq/relayer/limiter/limiter.go |
Renamed method call from GetFinalityConfirmations to GetLimitConfirmations in the hasEnoughConfirmations function. |
services/rfq/relayer/relconfig/getters.go |
Added new method GetLimitConfirmations to Config struct, returning confirmation limits for specified chain IDs. |
go
, size/xs
🐰 In the code where changes unfold,
A new limit for confirmations told.
From finality to limits, we hop,
Ensuring transactions don’t stop!
With methods new and old in play,
Our logic grows brighter each day! 🌟
services/rfq/relayer/limiter/limiter.go (1)
`101-101`: **Verify the implementation of the `GetLimitConfirmations` method.** The change from `GetFinalityConfirmations` to `GetLimitConfirmations` aligns with the PR objective of using limit confirmations instead of finality. The method call update looks good. To ensure the correctness of this change, please verify that the `GetLimitConfirmations` method is implemented correctly and returns the expected values for different chain IDs. You can use the following script to check the method implementation:Verification successful
--- **Implementation of `GetLimitConfirmations` method verified and correct** The `GetLimitConfirmations` method is properly implemented in `services/rfq/relayer/relconfig/getters.go` and correctly used in the `hasEnoughConfirmations` function. The method returns the limit confirmations for a given chain ID, aligning with the PR objective of using limit confirmations instead of finality.Scripts executed
The following scripts were executed for the analysis: Script: ```shell #!/bin/bash # Description: Verify the implementation of the `GetLimitConfirmations` method. # Test: Search for the method declaration. Expect: The method should exist in the codebase. ast-grep --lang go --pattern $'func (c *Config) GetLimitConfirmations(chainID int) (uint64, error) { $$$ }' # Test: Search for the method usage. Expect: The method should be used in the `hasEnoughConfirmations` function. rg --type go -A 5 $'GetLimitConfirmations' ``` Length of output: 1142services/rfq/relayer/relconfig/getters.go (1)
`852-858`: **LGTM!** The `GetLimitConfirmations` function is implemented correctly and provides a useful utility for retrieving the limit of confirmations for a given chain ID. It properly handles the case when no chain configuration exists for the provided ID by returning an error.
Latest commit: |
ff44360
|
Status: | ✅ Deploy successful! |
Preview URL: | https://dd0fa15d.sanguine-fe.pages.dev |
Branch Preview URL: | https://use-limit-confirmations.sanguine-fe.pages.dev |
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 36.37752%. Comparing base (
d4d1c5a
) to head (ff44360
). Report is 22 commits behind head on master.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
closed in favor of #3163
Description A clear and concise description of the features you're adding in this pull request.
Additional context Add any other context about the problem you're solving.
Metadata
Summary by CodeRabbit
New Features
Bug Fixes