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

internal/reader: add GetExpectedNextSequenceNumber method #81

Merged
merged 4 commits into from
Aug 27, 2024

Conversation

makramkd
Copy link
Collaborator

@makramkd makramkd commented Aug 27, 2024

Test in core: smartcontractkit/ccip#1373

The commit plugin currently builds merkle roots of size one because it only reads offramp sequence numbers. Add this so it can read onramp sequence numbers as well

@makramkd makramkd marked this pull request as ready for review August 27, 2024 14:06
@makramkd makramkd requested a review from a team as a code owner August 27, 2024 14:06
// in the onramp.
GetExpectedNextSequenceNumber(
ctx context.Context,
sourceChainSelector cciptypes.ChainSelector,
Copy link
Contributor

Choose a reason for hiding this comment

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

I thought we were going to stop using the implicit destination:

Suggested change
sourceChainSelector cciptypes.ChainSelector,
source, dest cciptypes.ChainSelector,

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good catch, done.

}

if err := r.validateReaderExistence(sourceChainSelector); err != nil {
return 0, err
Copy link
Contributor

Choose a reason for hiding this comment

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

wrap the err?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We have a ticket for this I want to tackle next: https://smartcontract-it.atlassian.net/browse/CCIP-3071

Copy link

Test Coverage

Branch Coverage
mk/ccip-3112 62.5%
ccip-develop 54.6%

@makramkd makramkd merged commit 33f5819 into ccip-develop Aug 27, 2024
3 checks passed
@makramkd makramkd deleted the mk/ccip-3112 branch August 27, 2024 16:45
makramkd added a commit to smartcontractkit/ccip that referenced this pull request Aug 27, 2024
## Motivation

We want to add a test for GetExpectedNextSequenceNumber in
ccipreader_test.go

Related PR: smartcontractkit/chainlink-ccip#81

## Solution

Add a test for GetExpectedNextSequenceNumber in ccipreader_test.go
asoliman92 pushed a commit to smartcontractkit/chainlink that referenced this pull request Aug 28, 2024
We want to add a test for GetExpectedNextSequenceNumber in
ccipreader_test.go

Related PR: smartcontractkit/chainlink-ccip#81

Add a test for GetExpectedNextSequenceNumber in ccipreader_test.go
asoliman92 pushed a commit to smartcontractkit/chainlink that referenced this pull request Aug 28, 2024
We want to add a test for GetExpectedNextSequenceNumber in
ccipreader_test.go

Related PR: smartcontractkit/chainlink-ccip#81

Add a test for GetExpectedNextSequenceNumber in ccipreader_test.go
asoliman92 pushed a commit to smartcontractkit/chainlink that referenced this pull request Aug 28, 2024
We want to add a test for GetExpectedNextSequenceNumber in
ccipreader_test.go

Related PR: smartcontractkit/chainlink-ccip#81

Add a test for GetExpectedNextSequenceNumber in ccipreader_test.go
AnieeG pushed a commit to smartcontractkit/ccip that referenced this pull request Aug 28, 2024
## Motivation

We want to add a test for GetExpectedNextSequenceNumber in
ccipreader_test.go

Related PR: smartcontractkit/chainlink-ccip#81

## Solution

Add a test for GetExpectedNextSequenceNumber in ccipreader_test.go
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.

3 participants