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

CCIPConfig -> CCIPHome #1454

Closed
wants to merge 8 commits into from
Closed

CCIPConfig -> CCIPHome #1454

wants to merge 8 commits into from

Conversation

RensR
Copy link
Collaborator

@RensR RensR commented Sep 20, 2024

rename configCount to version
remove CCIPConfigTypes
rm _groupByPluginType
Steamline code
don't pass in derivable values

Copy link
Contributor

github-actions bot commented Sep 20, 2024

LCOV of commit f0a0f3b during Solidity Foundry #8294

Summary coverage rate:
  lines......: 97.7% (2261 of 2314 lines)
  functions..: 94.8% (420 of 443 functions)
  branches...: 93.4% (538 of 576 branches)

Files changed coverage rate: n/a

// Validate the state transition being proposed, which is implicitly defined by the combination
// of lengths of the current and new configurations.
_validateConfigStateTransition(currentState, newState);

uint64[] memory configCounts = new uint64[](newConfig.length);
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we replace all occurrences of configCount with version?

/// @notice Determine the config state of the configuration from the length of the config.
/// @param configLen The length of the configuration.
/// @return The config state.
function _stateFromConfigLength(uint256 configLen) internal pure returns (CCIPConfigTypes.ConfigState) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Implicitly being done somewhere else or just inlined?

Copy link
Contributor

Choose a reason for hiding this comment

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

Inlined into _computeNewConfigWithMeta

if (newConfigWithMeta[0].configCount != 1) {
revert WrongConfigCount(newConfigWithMeta[0].configCount, 1);
if (newConfigWithMeta[0].version != 1) {
revert WrongConfigCount(newConfigWithMeta[0].version, 1);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
revert WrongConfigCount(newConfigWithMeta[0].version, 1);
revert WrongVersion(newConfigWithMeta[0].version, 1);

@cl-sonarqube-production
Copy link

@RensR RensR closed this Sep 23, 2024
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.

2 participants